vercel-composition-patterns
What it does
This skill shares React component design patterns that keep code easy to change as it grows. It is for developers who want interface parts to be reusable and clear.
When to use it
- ✓When a React component has many on-or-off settings and is hard to read.
- ✓When you are building a shared component library for several pages.
- ✓When you are reviewing how component state and context are arranged in an app.
Skill link
https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/vercel-composition-patterns/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Refactor this React button so it stops using a long list of true-or-false settings.”
5 new skills a week. 1 minute to read.
How it works
It gives rules for splitting a component into parts that work together, lifting shared state up, and using React 19 features where they fit.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
Extended reference:
AGENTS.mdin this directory is the long-form upstream guide (vendored from Vercel). It is supplementary reference material scoped to this skill only —SKILL.mdis the loadable entry point and the authority. It does not override or extend the repository-rootAGENTS.md/AGENT_GUIDE.md.
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.md
Each 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
FAQ
Is this only for React?
Yes. The patterns are for React components, including the React 19 API changes the skill covers.
What is a compound component?
It is a set of parts that work together, such as a menu with its own items and trigger, rather than one component with many settings.
Where is the full guide?
The skill points to an extended reference file in the same folder for more detail.
Details
Original description by the author
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.
repo: calesthio/OpenMontage
Popularity
- GitHub stars
- 75k
- Ranking position
- #2695
- License
- AGPL-3.0
- Updated
- 10/28/2026
Comments
- …
More skills from this repository
3d-asset-generation
75kHelps your agent choose how to create 3D objects for a scene, using catalogs, text or image to 3D tools, and Blender for final assembly.
acestep
75kHelps your agent create background music, songs, jingles, and stems for a video using the open ACE-Step music generator.
agents
75kHelps your agent build voice AI assistants with ElevenLabs, such as customer service bots and interactive voice characters.
ai-video-gen
75kHelps your agent generate AI video clips from a text description or a reference image, choosing from several video generation services.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.