Vercel React Best Practices
sanity-io/sanity
React and Next.js performance optimization guidelines from Vercel Engineering.
Rules for structuring React components with composition instead of boolean props, covering compound components, lifted state, variants and React 19 changes.
$ npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install vercel-labs/openreview vercel-composition-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/vercel-labs/openreview.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/vercel-composition-patterns .claude/skills/vercel-composition-patterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "vercel-composition-patterns" agent skill from https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patterns into .claude/skills/vercel-composition-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "vercel-composition-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install vercel-labs/openreview vercel-composition-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vercel-labs/openreview.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/vercel-composition-patterns .agents/skills/vercel-composition-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "vercel-composition-patterns" agent skill from https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patterns into .agents/skills/vercel-composition-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "vercel-composition-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install vercel-labs/openreview vercel-composition-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vercel-labs/openreview.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/vercel-composition-patterns .cursor/skills/vercel-composition-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "vercel-composition-patterns" agent skill from https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patterns into .cursor/skills/vercel-composition-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "vercel-composition-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/vercel-labs/openreview.git --path .agents/skills/vercel-composition-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install vercel-labs/openreview vercel-composition-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vercel-labs/openreview.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/vercel-composition-patterns .gemini/skills/vercel-composition-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "vercel-composition-patterns" agent skill from https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patterns into .gemini/skills/vercel-composition-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "vercel-composition-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install vercel-labs/openreview vercel-composition-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/vercel-labs/openreview.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/vercel-composition-patterns .github/skills/vercel-composition-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "vercel-composition-patterns" agent skill from https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patterns into .github/skills/vercel-composition-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "vercel-composition-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install vercel-labs/openreview vercel-composition-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vercel-labs/openreview.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/vercel-composition-patterns .opencode/skills/vercel-composition-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "vercel-composition-patterns" agent skill from https://github.com/vercel-labs/openreview/tree/main/.agents/skills/vercel-composition-patterns into .opencode/skills/vercel-composition-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "vercel-composition-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
vercel-composition-patternsRules for structuring React components with composition instead of boolean props, covering compound components, lifted state, variants and React 19 changes.
This rule set steers React code away from components that grow a pile of boolean props and toward composition. A SKILL.md index groups the guidance by priority: component architecture first, then state management, implementation patterns and React 19 APIs, each rule in its own file with a short explanation, an incorrect example and a correct one.
Rules include avoiding boolean props to customize behavior, building compound components that share context, keeping the provider as the only place that knows how state is managed, defining a generic context interface, lifting state into providers so siblings can reach it, writing explicit variant components, and preferring children over render props. The React 19 section applies only to React 19 and later: skip forwardRef and use use() instead of useContext(). A compiled AGENTS.md holds every rule in one document.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 672deb2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
React Composition Patterns loads about 721 tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 257 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from vercel-labs/openreview at commit 672deb2, republished under its MIT licence (© vercel-labs). 257 words, ~721 tokens.
.claude/skills/vercel-composition-patterns/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.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.mdEach rule file contains:
For the complete guide with all rules expanded: AGENTS.md
© vercel-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 10 other files in .agents/skills/vercel-composition-patterns of vercel-labs/openreview.
Open the folder on GitHubat commit 672deb2
We found 65 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 58 other GitHub owners. This page covers the copy in vercel-labs/openreview, which our catalogue first saw on October 7, 2026.
…and 15 more copies not listed here.
React Composition Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| React Composition Patterns this skillvercel-labs/openreview | 1.7k | 58 repos | ~721 | Automated safety check: Pass | MIT | |
| Vercel React Best Practicessanity-io/sanity | 6.4k | 130 repos | ~1.6k | Automated safety check: Pass | MIT | |
| React Best Practicesmastra-ai/mastra | 29k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| React Render Types CompositionHorusGoul/eslint-plugin-react-render-types | 111 | — | ~1.1k | Automated safety check: Pass | MIT | |
| React Best Practicesryokun6/ryos | 1.3k | — | ~2k | Automated safety check: Pass | MIT | |
| Vercel React Best Practicesgambitph/Stackable | 350 | — | ~2k | Automated safety check: Pass | MIT |
sanity-io/sanity
React and Next.js performance optimization guidelines from Vercel Engineering.
mastra-ai/mastra
React performance optimization guidelines from Mastra Engineering.
HorusGoul/eslint-plugin-react-render-types
Composition patterns for building React components with @renders type annotations from eslint-plugin-react-render-types.
ryokun6/ryos
React performance optimization guidelines from Vercel Engineering (vercel-labs/agent-skills).
gambitph/Stackable
React performance optimization guidelines from Vercel Engineering.
modu-ai/moai-adk
React/Next.js component design patterns, state management strategies, and project structure reference for frontend development.
vercel-labs/openreview
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my…
vercel-labs/openreview
A prioritized rule set for React Native and Expo apps covering list performance, animation, navigation, UI patterns, state, rendering, monorepos and configuration.
vercel-labs/openreview
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
vercel-labs/openreview
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
vercel-labs/openreview
Upgrade Next.js to the latest version following official migration guides and codemods
Works with
Categories
Rules for structuring React components with composition instead of boolean props, covering compound components, lifted state, variants and React 19 changes. This rule set steers React code away from components that grow a pile of boolean props and toward composition.md index groups the guidance by priority: component architecture first, then state management, implementation patterns and React 19 APIs, each rule in its own file with a short explanation, an incorrect example and a correct one.
React Composition Patterns fits situations like: refactoring a component that has many boolean props; designing the API of a reusable React component library; building compound components that share state through context; reviewing component architecture before it spreads across a codebase.
Run `npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a claude-code`. Or copy the skill folder (.agents/skills/vercel-composition-patterns in vercel-labs/openreview) into .claude/skills/vercel-composition-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a codex`. Or copy the skill folder (.agents/skills/vercel-composition-patterns in vercel-labs/openreview) into .agents/skills/vercel-composition-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vercel-labs/openreview --skill vercel-composition-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vercel-composition-patterns, .gemini/skills/vercel-composition-patterns, .github/skills/vercel-composition-patterns and .opencode/skills/vercel-composition-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: React Composition Patterns is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
React Composition Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 721 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with React Composition Patterns: Vercel React Best Practices (sanity-io/sanity, 6.4k stars), React Best Practices (mastra-ai/mastra, 29k stars), React Render Types Composition (HorusGoul/eslint-plugin-react-render-types, 111 stars) and React Best Practices (ryokun6/ryos, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
vercel-labs (a GitHub organization, an official publisher) maintains it in vercel-labs/openreview, which has 1,697 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on March 6, 2026.
Source: vercel-labs/openreview on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.