Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
vercel-labs avatar

Vercel Composition Patterns

  • 354 installs
  • 29.7k repo stars
  • Updated July 24, 2026
  • vercel-labs/claude-skills

This is a copy of vercel-composition-patterns by vercel-labs - installs and ranking accrue to the original listing.

vercel-composition-patterns is a version 1.0.0 Claude Code skill that teaches compound-component and state-lifting patterns so React UIs scale without boolean prop sprawl for developers maintaining or generating componen

About

vercel-composition-patterns is Vercel's version 1.0.0 Engineering guide packaged as an agent skill for React composition architecture. It instructs agents and developers to replace boolean prop proliferation with compound components, lifted state, and composable internals so large React codebases stay readable for humans and LLM refactors alike. The document targets maintenance, generation, and refactoring workflows where render-prop trees and flag-heavy props create fragile APIs. Developers reach for it when components accumulate isOpen, isDisabled, or variant booleans, or when nested render props obscure layout structure. Guidance is optimized for AI-assisted consistency but applies equally to manual React reviews.

  • High-priority rules: avoid boolean prop proliferation; prefer compound components
  • Medium-priority state patterns: decouple state from UI, generic context interfaces, lift state into providers
  • Implementation patterns: explicit component variants and children composition over render props
  • Optimized for AI-maintained codebases that must stay legible as feature flags multiply
  • Table of contents ties each pattern to maintainability for humans and agents at scale

Vercel Composition Patterns by the numbers

  • 354 all-time installs (skills.sh)
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/vercel-labs/claude-skills --skill vercel-composition-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs354
repo stars29.7k
Security audit3 / 3 scanners passed
Last updatedJuly 24, 2026
Repositoryvercel-labs/claude-skills

How do you scale React components without boolean props?

Teach your agent compound-component and state-lifting patterns so React UIs scale without boolean prop sprawl and fragile render-prop trees.

Who is it for?

React maintainers refactoring growing component libraries where boolean flags and render-prop nesting hurt readability and agent-assisted edits.

Skip if: Non-React frontends or greenfield prototypes with only a handful of trivial presentational components and no prop-sprawl pain yet.

When should I use this skill?

User mentions React boolean prop sprawl, compound components, state lifting, or refactoring render-prop-heavy component trees.

What you get

Compound-component React APIs, lifted shared state, and composable component internals without boolean prop proliferation.

  • refactored compound components
  • lifted state structures
  • composition-first component APIs

By the numbers

  • Version 1.0.0 React composition patterns guide from Vercel Engineering

Files

SKILL.mdMarkdownGitHub ↗

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

PriorityCategoryImpactPrefix
1Component ArchitectureHIGHarchitecture-
2State ManagementMEDIUMstate-
3Implementation PatternsMEDIUMpatterns-
4React 19 APIsMEDIUMreact19-

Quick Reference

1. Component Architecture (HIGH)

  • architecture-avoid-boolean-props - Don't add boolean props to customize

behavior; use composition

  • architecture-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 managed

  • state-context-interface - Define generic interface with state, actions, meta

for dependency injection

  • state-lift-state - Move state into provider components for sibling access

3. Implementation Patterns (MEDIUM)

  • patterns-explicit-variants - Create explicit variant components instead of

boolean modes

  • patterns-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 use forwardRef; use use() instead of useContext()

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

Related skills

How it compares

Pick this over generic React style guides when the pain is prop-sprawl and composition API design rather than hooks or data fetching alone.

FAQ

What problem does vercel-composition-patterns solve?

vercel-composition-patterns addresses boolean prop proliferation and fragile render-prop trees in React. The version 1.0.0 guide teaches compound components and lifted state so component APIs stay flexible as codebases and AI refactors scale.

Is vercel-composition-patterns only for AI agents?

vercel-composition-patterns is optimized for agents generating or refactoring React code, but humans can follow the same composition rules. Guidance covers compound components, state lifting, and composable internals for maintainable React libraries.

Is Vercel Composition Patterns safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.