What problem does it solve?
This Skill eliminates boolean prop proliferation and fragile conditional logic in React component APIs by promoting composition, compound components, and provider-based state boundaries so components remain explicit, testable, and easy to maintain by humans and automation.
Core Features & Use Cases
- Avoid Boolean Prop Proliferation: Replace many boolean props with explicit component variants to prevent exponential state combinations.
- Compound Components & Providers: Build compound components with a shared context (state, actions, meta) so subcomponents compose without prop drilling.
- Generic Context Interfaces: Define state, actions, and meta interfaces to allow dependency-injectable providers (local, global, or synced state implementations).
- Lift State into Providers: Move state management into provider boundaries so sibling/custom UI can access actions and state without ref hacks.
- React 19 API Guidance: Apply React 19-specific patterns such as using use() instead of useContext() and treating ref as a normal prop where applicable.
- Use Cases: Refactoring legacy components with many flags, building reusable UI libraries, reviewing component architecture, and instructing automated agents to perform refactors.
Quick Start
Refactor a React component that uses multiple boolean props into explicit compound components with a provider and shared context, and produce the updated component variants and provider implementation.