React composition patterns for scaling components and avoiding boolean prop proliferation.
Works with
Covers four priority categories: component architecture, state management, implementation patterns, and React 19 APIs, each with specific rules and code examples
Includes 10+ named patterns addressing compound components, context providers, state lifting, and explicit variants
Designed for refactoring bloated components, building reusable libraries, and reviewing component architecture decision
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionvercel-composition-patternsExecute the skills CLI command in your project's root directory to begin installation:
Fetches vercel-composition-patterns from vercel-labs/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate vercel-composition-patterns. Access via /vercel-composition-patterns in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
8
total installs
8
this week
24.6K
GitHub stars
0
upvotes
Run in your terminal
8
installs
8
this week
24.6K
stars
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.
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- |
architecture-avoid-boolean-props - Don't add boolean props to customize
behavior; use compositionarchitecture-compound-components - Structure complex components with shared
contextstate-decouple-implementation - Provider is the only place that knows how
state is managedstate-context-interface - Define generic interface with state, actions, meta
for dependency injectionstate-lift-state - Move state into provider components for sibling accesspatterns-explicit-variants - Create explicit variant components instead of
boolean modespatterns-children-over-render-props - Use children for composition instead
of renderX propsโ ๏ธ React 19+ only. Skip this section if using React 18 or earlier.
react19-no-forwardref - Don't use forwardRef; use use() instead of useContext()Read individual rule files for detailed explanations and code examples:
rules/architecture-avoid-boolean-props.md
rules/state-context-interface.md
Each rule file contains:
For the complete guide with all rules expanded: AGENTS.md
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
โ Do
โ Don't
๐ก Pro Tips
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
anthropics/claude-code
github/awesome-copilot
alirezarezvani/claude-skills
code-yeongyu/oh-my-opencode
asyrafhussin/agent-skills
mblode/agent-skills
Useful defaults in vercel-composition-patterns โ fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Useful defaults in vercel-composition-patterns โ fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Solid pick for teams standardizing on skills: vercel-composition-patterns is focused, and the summary matches what you get after install.
I recommend vercel-composition-patterns for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
vercel-composition-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
vercel-composition-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
vercel-composition-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added vercel-composition-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Keeps context tight: vercel-composition-patterns is the kind of skill you can hand to a new teammate without a long onboarding doc.
Useful defaults in vercel-composition-patterns โ fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 71