← All workflows
Design and accessibility / Workflow kit

Simplify a component API

A composable React component with migrated examples and a keyboard interaction check.

Install the skills

From the project you want to work in, use Node.js 22.20 or later, npm and Git. Run the block below to copy the selected skills into .claude/skills/. Existing copies with the same names can be replaced.

Project terminal
npx --yes skills@1.10.0 add vercel-labs/agent-skills@5a37a6329fbad3666c3207392a6a7c0110e92efb --skill vercel-composition-patterns web-design-guidelines --agent claude-code --copy --yes

Start Claude Code in that project and enter /skills to check the installed names.

Try it on your project

Bring along · A React component with awkward modes, two real call sites and the supported React version.

  1. List the invalid prop combinations and identify which call sites rely on each mode.
  2. Replace one problematic branch with composition and migrate the two examples.
  3. Exercise focus and accessible naming across both variants.
Starter prompt
Review this component and two real call sites. Simplify its API using composition where appropriate. Preserve keyboard behavior and list the migration steps for existing callers.

Check the result

Both examples compile and their keyboard flows still work. The documented API makes the old invalid combination difficult to express.

Optional connections

You can supply the same context as a local file or pasted excerpt. To connect a service, run its command in the project and check its status with /mcp inside Claude Code.

Figma

Use a selected design frame as the reference for a component review. Sign in to Figma through /mcp. Your account needs access to the file. Plan and seat limits can affect requests.

Terminal
claude mcp add --scope local --transport http figma "https://mcp.figma.com/mcp"

Provider setup →