
Vercel Composition Patterns
Tackles the classic React problem of components drowning in boolean props by teaching composition patterns that actually scale. Covers compound components, context providers, state lifting, and render prop alternatives with specific rules like avoiding boolean customization props and using explicit variant components instead. Includes React 19 API updates like dropping forwardRef for the new use() hook. The skill provides both quick reference rules and detailed examples for refactoring messy component APIs. Honestly, these patterns should be standard practice but most teams discover them the hard way after their component props become unmanageable.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 10
- skills.sh installs
- 446.4K
- GitHub stars
- 33.8K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add vercel-labs/agent-skills --skill vercel-composition-patterns --agent claude-codeInstalls into .claude/skills of the current project.
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- |
| 4 | React 19 APIs | MEDIUM | react19- |
Quick Reference
1. Component Architecture (HIGH)
Sponsors
Details
- Repository
- github.com/vercel-labs/agent-skills
- Categories
- Frontend Development, AI & Agent Building, Cloud & Infrastructure
More from vercel-labs/agent-skills
All 14- Vercel React Native Skills271.9K
- Deploy To Vercel187.4K
- Vercel React View Transitions185.5K
- Vercel Cli With Tokens150.4K
- Vercel Optimize126K
- Writing Guidelines122.4K
- Vercel Deploy534
- Vercel Composition Patterns
- Vercel React Best Practices
- Vercel React Native Skills
- Vercel React View Transitions
- Vercel React Best Practices885.1K
- Web Design Guidelines843.6K