.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/agent-skills/composition-patterns
home/skills/vercel-labs/agent-skills/composition-patterns
vercel-labs avatar

composition-patterns

byvercel-labs· 154 skills

Installs

266k

Stars

29k

Forks

2.6k

Category

Frontend Development

View on GitHub

TL;DR

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

How to install composition-patterns?

vercel-labs/agent-skills/composition-patterns
$npx -y skills add vercel-labs/agent-skills --skill composition-patterns

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/vercel-labs/agent-skills" --skill "vercel-labs/agent-skills/composition-patterns"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/vercel-labs/agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/vercel-labs/agent-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# React Composition Patterns
2 
3Composition patterns for building flexible, maintainable React components. Avoid
4boolean prop proliferation by using compound components, lifting state, and
5composing internals. These patterns make codebases easier for both humans and AI
6agents to work with as they scale.
7 
8## When to Apply
9 
10Reference these guidelines when:
11 
12- Refactoring components with many boolean props
13- Building reusable component libraries
14- Designing flexible component APIs
15- Reviewing component architecture
16- Working with compound components or context providers
17 
18## Rule Categories by Priority
19 
20| Priority | Category | Impact | Prefix |
21| -------- | ----------------------- | ------ | --------------- |
22| 1 | Component Architecture | HIGH | `architecture-` |
23| 2 | State Management | MEDIUM | `state-` |
24| 3 | Implementation Patterns | MEDIUM | `patterns-` |
25| 4 | React 19 APIs | MEDIUM | `react19-` |
26 
27## Quick Reference
28 
29### 1. Component Architecture (HIGH)
30 
31- `architecture-avoid-boolean-props` - Don't add boolean props to customize
32 behavior; use composition
33- `architecture-compound-components` - Structure complex components with shared
34 context
35 
36### 2. State Management (MEDIUM)
37 
38- `state-decouple-implementation` - Provider is the only place that knows how
39 state is managed
40- `state-context-interface` - Define generic interface with state, actions, meta
41 for dependency injection
42- `state-lift-state` - Move state into provider components for sibling access
43 
44### 3. Implementation Patterns (MEDIUM)
45 
46- `patterns-explicit-variants` - Create explicit variant components instead of
47 boolean modes
48- `patterns-children-over-render-props` - Use children for composition instead
49 of renderX props
50 
51### 4. React 19 APIs (MEDIUM)
52 
53> **⚠️ React 19+ only.** Skip this section if using React 18 or earlier.
54 
55- `react19-no-forwardref` - Don't use `forwardRef`; use `use()` instead of `useContext()`
56 
57## How to Use
58 
59Read individual rule files for detailed explanations and code examples:
60 
61```
62rules/architecture-avoid-boolean-props.md
63rules/state-context-interface.md
64```
65 
66Each rule file contains:
67 
68- Brief explanation of why it matters
69- Incorrect code example with explanation
70- Correct code example with explanation
71- Additional context and references
72 
73## Full Compiled Document
74 
75For the complete guide with all rules expanded: `AGENTS.md`

Preview

vercel-labs/agent-skillsvercel-labs/agent-skills

$ npx -y skills add vercel-labs/agent-skills --skill composition-patterns

▸ installing to .claude/skills…

✓ composition-patterns ready

Repovercel-labs/agent-skills
TypeSkills
CategoryFrontend Development
ForDeveloper
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. vercel-labs avatarreact-best-practicesReact and Next.js performance optimization guidelines from Vercel Engineering.SkillsJul 2026587k29k
  2. heygen-com avatarhyperframes-registryInstall, discover, and wire registry blocks and components into HyperFrames compositions.SkillsJul 2026267k38k
  3. shadcn avatarshadcnManages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces.SkillsJul 2026257k120k
  4. larksuite avatarlark-apps妙搭(Spark/Miaoda)应用开发与托管:应用创建、本地全栈开发、云端生成迭代、创意设计(UI mockup / 可交互原型 / 线框图 / 落地页 / 仪表盘 / 幻灯片 deck / 视觉探索)、AI相关能力和飞书平台能力或者其他外部能力集成、日志/Trace/监控指标/PV/UV…SkillsJul 2026235k16k
  5. leonxlnx avatarimage-to-code-skillElite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then…SkillsJul 2026175k68k
  6. heygen-com avatarhyperframes-keyframesUse when a HyperFrames composition needs seek-safe 2D/3D keyframes, GSAP timelines, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text…SkillsJul 2026124k38k