Developer skill

React Composition Patterns

Refactor React components with compound components, state lifting, and composition patterns that avoid boolean-prop sprawl.

Best for

React developers designing reusable component APIs and shared UI systems.

Vercel
Publisher
vercel-labs/agent-skills
Repository

Verified source

Inspect the skill before you use it.

vercel-labs/agent-skills on GitHub
Setup command

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

Common use cases

When to use this skill

  • Replace components with too many boolean props.
  • Design compound components with clear ownership.
  • Reduce prop drilling without hiding state flow.

Example prompts

Prompts you can adapt

Refactor this component using composition patterns without changing its behavior.
Review this component API for boolean-prop proliferation.

How to use it

A simple workflow

1

Open the verified Vercel source on GitHub and review its SKILL.md or repository documentation.

2

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

3

Start with an example prompt below, adapt it to your project, and verify the result.

FAQ

Questions about React Composition Patterns

Is this linked to an official public source?

Yes. This page links directly to the Vercel GitHub source shown above. Review its documentation and license before production use.

How do I add this skill?

Run the setup command shown on this page, then refresh your agent if required.