composition-patterns
Skill7 starsChanged 6 months agoMITView on GitHub
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.
7 other projects use a version of this, 5 of them edited.
Adopted by
Most recently taken up by
- PracticalSwan/agent-skillsedited, first seen Oct 19, 2026
- Marvellbrazil/my-agentic-skillsedited, first seen Oct 17, 2026
- excatt/superclaude-plusplustheir own version, first seen Oct 13, 2026
- udsy19/.claudeedited, first seen Oct 5, 2026
- 10xequity/claude-skill-librarytheir own version, first seen Aug 2, 2026
- fegone/claude-agent-starteredited, first seen Jul 6, 2026
Used with
Projects with it also use ui-ux-pro-max and frontend-design.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
StrayDragonSkillui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Also in 3 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- PracticalSwan/agent-skills★ 2248% same
- Marvellbrazil/my-agentic-skills★ 499% same
- sagnikmitra/skills★ 172% same
- fegone/claude-agent-starter★ 099% same
- udsy19/.claude★ 099% same
Wrote their own version · 2
- excatt/superclaude-plusplus★ 14same name
- 10xequity/claude-skill-library★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cavemanSkill
- code-qualitySkill
- docker-expertSkill
- eea-design-systemSkill
- grill-meSkill
- handoffSkill
- jenkins-pipelineSkill
- plone-backend-developerSkill
- plone-frontend-developerSkill
- quality-fixesSkill
- react-best-practicesSkill
- react-native-skillsSkill
- react-view-transitionsSkill
- testingSkill
- volto-cypress-writerSkill
- web-design-guidelinesSkill
The file
We split this skill into the rules it gives an agent
2 rules. 1 is common, 1 is distinctive, and 0 are very specific to this project.
1
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 75
Read individual rule files for detailed explanations and code examples:
- Distinctive: line 110
When composition pattern tasks are complete, consider these EEA skills:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
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)
architecture-avoid-boolean-props- Don't add boolean props to customize behavior; use compositionarchitecture-compound-components- Structure complex components with shared context
2. State Management (MEDIUM)
state-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 access
3. Implementation Patterns (MEDIUM)
patterns-explicit-variants- Create explicit variant components instead of boolean modespatterns-children-over-render-props- Use children for composition instead of renderX props
4. React 19 APIs (MEDIUM)
⚠️ React 19+ only. Skip this section if using React 18 or earlier.
react19-no-forwardref- Don't useforwardRef; useuse()instead ofuseContext()
How to Use
Read individual rule files for detailed explanations and code examples:
rules/architecture-avoid-boolean-props.md
rules/state-context-interface.mdEach rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
<!-- BEGIN EEA-OVERRIDES -->EEA-Specific Overrides
<!-- EEA-Overrides-Version: 1.0 --><!-- Last-Sync: 2026-05-04 -->EEA-Specific Patterns
Placeholder
This file is a placeholder for future EEA-specific overrides to the upstream composition-patterns skill. Currently, no overrides are needed as the upstream guidelines are broadly applicable.
Handoff to Other EEA Skills
When composition pattern tasks are complete, consider these EEA skills:
eea-design-system: EEA-specific component library and design tokenseea-accessibility(future): EEA accessibility compliance (WCAG 2.1 AA)
Notes
- Upstream source: https://github.com/vercel-labs/agent-skills
- License: MIT
<!-- END EEA-OVERRIDES --><!-- Merged Build: upstream SKILL.md + EEA-OVERRIDES.md --><!-- Auto-generated by scripts/build.sh - DO NOT EDIT DIRECTLY --><!-- Source: https://github.com/eea/eea.agent.skills -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

