skills/react-render-types-composition/SKILL.md
Composition patterns for building React components with @renders type annotations from eslint-plugin-react-render-types. Use when: (1) writing React components that need @renders JSDoc annotations, (2) building a design system with enforced component composition (e.g., Menu only accepts MenuItem), (3) deciding which @renders modifier to use (required, optional, many, unchecked), (4) creating wrapper or transparent components, (5) annotating slot props like children/header/footer, (6) using render chains, union types, or type aliases with @renders, or (7) building app layouts that consume a @renders-annotated design system.
npx skillsauth add horusgoul/eslint-plugin-react-render-types react-render-types-compositionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Patterns for building React components with @renders type annotations. Covers design system primitives, app-level composition, and advanced techniques.
@renders {X} Required — must return X
@renders? {X} Optional — may return X or null
@renders* {X} Many — zero or more X
@renders! {X} Unchecked — declares X, skips return validation
@renders {A | B} Union — must return A or B
@renders {MyAlias} Type alias — resolves type MyAlias = A | B at lint time
@transparent Wrapper — plugin looks through to validate children
(or use additionalTransparentComponents setting for built-ins)
| Priority | Category | When to read | |----------|----------|--------------| | 1 | Design System Patterns | Building constrained component APIs | | 2 | Wrapper Patterns | Creating transparent or conditional wrappers | | 3 | App Composition Patterns | Consuming a design system in app layouts | | 4 | Advanced Patterns | Unions, chains, dynamic rendering, expressions |
Core patterns for building component libraries with enforced composition.
constrained-children — Restrict children to specific component types (Menu → MenuItem)typed-slot-props — Enforce types on named slot props (header, footer, sidebar)component-variants — Create specialized variants that satisfy a base render typeRead detailed examples: references/patterns/design-system.md
Patterns for components that wrap other content without breaking composition.
transparent-wrappers — Mark layout/styling wrappers with @transparentconditional-rendering — Use @renders? and @renders* for optional/repeated contentRead detailed examples: references/patterns/wrappers.md
Patterns for building app-level layouts that consume design system components.
page-layouts — Compose pages with typed header/content/footer slotsdashboard-composition — Build dashboards with constrained card/widget areasnavigation-structure — Typed sidebar/nav with enforced nav item typesRead detailed examples: references/patterns/app-composition.md
Techniques for complex scenarios.
union-types — Accept multiple component types in a single slottype-aliases — Define reusable type unions for @renders annotationsrender-chains — Satisfy render types transitively through intermediate componentsunchecked-escape-hatch — Use @renders! for dynamic rendering the plugin can't analyzeexpression-analysis — Ternary, logical AND, and .map() in annotated returnsRead detailed examples: references/patterns/advanced.md
Can the slot be empty?
├── No → Must always render something
│ ├── Exactly one component → @renders {X}
│ └── One of several types → @renders {A | B}
└── Yes
├── Zero or one component → @renders? {X}
└── Zero or more instances → @renders* {X}
Can the plugin analyze the return?
├── Yes → use the modifier above
└── No (dynamic/registry) → add ! → @renders! {X}, @renders?! {X}, @renders*! {X}
tools
Install and configure eslint-plugin-react-render-types in a TypeScript React project. Use when: (1) adding eslint-plugin-react-render-types to a project, (2) configuring ESLint flat config with typed linting for @renders support, (3) troubleshooting typed linting errors or plugin configuration, (4) setting up projectService or tsconfig for the plugin, (5) understanding which rules to enable and what they do, or (6) setting up the IDE language service plugin for @renders features (unused import suppression, go-to-definition, hover, completions, find references, rename, diagnostics).
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------