What problem does it solve?
This Skill helps you refactor and design React components that are easier to maintain, easier to reuse, and less prone to boolean prop explosion. It is especially useful when a single component has grown into many modes, render props, or tightly coupled state handling.
Core Features & Use Cases
- Compound Components: Break complex UI into composable parts that share state through context.
- State Lifting and Dependency Injection: Move state into providers so sibling components and external UI can access the same actions and data.
- Explicit Variants: Replace ambiguous multi-boolean components with clear, self-documenting variants like ThreadComposer or EditMessageComposer.
- React 19 Guidance: Apply updated patterns for refs and context usage in modern React codebases.
- Use Case: A team building a message composer can use these rules to replace one overloaded component with smaller, explicit, reusable pieces that are easier for both humans and agents to extend.
Quick Start
Ask the Skill to review a React component API and rewrite it using compound components, lifted state, and explicit variants where appropriate.