From ts-dev-kit
Provides React composition patterns to refactor components avoiding boolean prop proliferation, using compound components, render props, context providers, and React 19 APIs. For building flexible libraries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ts-dev-kit:composition-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Composition patterns for building flexible, maintainable React components. Avoid
references/architecture-avoid-boolean-props.mdreferences/architecture-compound-components.mdreferences/patterns-children-over-render-props.mdreferences/patterns-explicit-variants.mdreferences/react19-no-forwardref.mdreferences/state-context-interface.mdreferences/state-decouple-implementation.mdreferences/state-lift-state.mdComposition patterns for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale.
Skip these patterns when: fewer than 3 props, simple variants, or single-use components.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Component Architecture | HIGH | architecture- |
| 2 | State Management | MEDIUM | state- |
| 3 | Implementation Patterns | MEDIUM | patterns- |
| 4 | React 19 APIs | MEDIUM | react19- |
isThread, isEditing, isDMThread to customize behavior. Each boolean doubles possible states. Use composition instead — see references/architecture-avoid-boolean-props.mdstate, actions, meta for dependency injection — see references/state-context-interface.mdchildren for composition instead of renderX props — see references/patterns-children-over-render-props.mdReact 19+ only. Skip this section if using React 18 or earlier.
forwardRef; pass ref as a regular prop. Use use() instead of useContext() — see references/react19-no-forwardref.mdnpx claudepluginhub jgamaraalv/ts-dev-kit --plugin ts-dev-kitProvides React composition patterns for refactoring boolean prop-heavy components, compound components, context providers, render props, and React 19 APIs.
Guides React developers in using composition patterns to scale components, avoid boolean props, and design reusable APIs. Covers compound components, context providers, and React 19 changes.
Provides React composition patterns to avoid boolean prop proliferation using compound components, lifting state, and context providers for flexible, maintainable component APIs.