React Composition Patterns
React composition patterns that scale for refactoring boolean-prop components and designing flexible, reusable APIs.
- CCM score
- 63 of 100
- skills.sh installs
- 505
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers component architecture, state management, and implementation patterns, ordered by priority from HIGH to MEDIUM impact
- Includes 8 rules on avoiding boolean props, compound components, decoupled providers, lifted state, explicit variants, and children over render props
- Provides a quick reference with rule prefixes and per-rule file paths, plus an AGENTS.md compiled guide with all rules expanded
- Designed for refactoring component libraries and reviewing component architecture, including work with compound components and context providers
Install
$ npx -y skills add secondsky/claude-skills --skill react-composition-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
React Composition Patterns
Composition 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.
When to Apply
Reference these guidelines when:
- Refactoring components with many boolean props
- Building reusable component libraries
- Designing flexible component APIs
- Reviewing component architecture
- Working with compound components or context providers
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Component Architecture | HIGH | architecture- |
| 2 | State Management | MEDIUM | state- |
| 3 | Implementation Patterns | MEDIUM | patterns- |
Quick Reference
1. Component Architecture (HIGH)
architecture-avoid-boolean-props- Don't add boolean props to customize behavior; use compositionarchitecture-compound-components- Structure complex components with shared context
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Frontend & UI Code, Code Review & Quality
- First seen
- Jun 3, 2026
Questions
What does the react-composition-patterns skill help with?
The react-composition-patterns skill guides refactoring React components that have too many boolean props, and designing flexible component libraries and reusable APIs. It covers compound components, render props, context providers, and component architecture. It also helps agents write and review component code that scales.
Which skills lead the Frontend and UI Code category alongside react-composition-patterns?
Other skills in the Frontend and UI Code category include vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns, and lark-apps. The react-composition-patterns skill focuses specifically on composition patterns that avoid boolean prop proliferation. Its rules cover component architecture, state management, and implementation patterns.
How do I install the react-composition-patterns skill?
Run npx -y skills add secondsky/claude-skills --skill react-composition-patterns -y inside your project. After installing, your agent can apply the skill's guidance on compound components, lifted state, and explicit variant components. The skill then helps it refactor React components toward children-based composition.
Does react-composition-patterns cover render props and context providers?
Yes, the skill's triggers include render props, context providers, and compound components. Its state rules explain that the provider is the only place that knows how state is managed. It also recommends defining a generic context interface with state, actions, and meta for dependency injection.
More from secondsky/claude-skills
All 116- Api Contract Testing502
- React Native Skills501
- Technical Specification501
- Mobile App Testing492
- Ml Model Training489
- Csrf Protection488
- Bun Test Basics485
- Payment Gateway Integration484
- Test Quality Analysis481
- Bun Hono Integration477
- Api Reference Documentation476
- Mutation Testing474
- Security Headers Configuration473
- Tanstack Router472
- Internationalization I18n469
- Seo Optimizer469
- Systematic Debugging469
- Bun Package Manager466
- Interaction Design466
- Api Error Handling465
- Sequential Thinking461
- Bun Nextjs453
- Websocket Implementation452
- Root Cause Tracing450
Similar to React Composition Patterns
More Frontend & UI Codereact-composition-2026patternsdev/skills1.3K installsComposition patterns for React components that replace boolean-prop sprawl with explicit, context-shared designs.
vercel-composition-patternsvercel-labs/agent-skills482.3K installsReact composition patterns that scale components and prevent boolean prop sprawl in React codebases.
react-component-architectureaj-geddes/useful-ai-prompts688 installsReusable React component patterns covering functional components, custom hooks, composition, and typed props, with reference guides.
react-patternsdavila7/claude-code-templates503 installsModern React principles covering component design, hooks, state selection, composition, performance, and TypeScript typing.
react-best-practicesalleneubank/claude-code3.2K installsDecision-tree guide for React components that steers logic away from unnecessary Effects toward render, events, and refs.
frontend-react-best-practicessergiodxa/agent-skills1.2K installsReact performance rules and composition patterns covering re-renders, bundle size, and hydration pitfalls.