Build a new reusable UI component or extend an existing one with clean props, variants, accessibility, and styling.
SkillScore95Maintained
Automatic
◆Frontend / UI pack
Last verified 8/3/2026
What it changes
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
Without skill91%
With skill95%
Checks it passed that the model alone missed
Uses design token variables instead of hard-coded Tailwind utility values like bg-red-600 or p-6
Extends the existing Button component with an optional loading boolean prop instead of creating a standalone LoadingButton component file
2 fixed19 passed either way0 still failing1 broke
Pass-rate lift
+5 pp
Tokens
+45%
Agent turns
0%
Response time
+6%
Model gemini-3.6-flashMeasured 8/3/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
Our design team requested a confirmation modal for critical actions, including a pending spinner state and accessible keyboard focus. Review our existing frontend UI code to determine whether to add new props to an existing dialog or create a dedicated new element. Provide the implemented component code, proper prop types, co-located styles, and accessibility checks.
What was checked, without and with the skill
Checked
Without skill
With skill
Uses design token variables instead of hard-coded Tailwind utility values like bg-red-600 or p-6
Missed
Passed
Co-locates styling in a module style file alongside the component file
Passed
Passed
Includes accessible keyboard handling attributes on the modal dialog element
Passed
Passed
case-01 · gemini-3.6-flash · 8/3/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md65 linessingle file
Create or Extend Component Skill
Purpose
Produce reusable, accessible, responsive UI components that fit the existing design system and avoid duplication — by extending existing components wherever possible.
When to Use
A new piece of UI is needed that is reusable or belongs to the design system (buttons, inputs, cards, modals, tabs, badges, layout shells, etc.).
An existing component needs a new variant, size, state, or prop to support a new use case.
When Not to Use
The UI is truly one-off and page-specific with no reuse potential — consider building it inline within the page/screen (still following styling rules), not as a new shared component.
A suitable component already exists and meets the need as-is — just use it.
Required Inputs
The UI requirement (what it needs to do, look like, and support).
Existing components/primitives from /components (or project equivalent) and the Design System Skill's tokens.
Any design reference (if provided).
Assumptions
Reuse is checked first; creation/extension is the fallback.
Components receive data via props or established state/data patterns — they don't own API calls or business logic.
Step-by-Step Workflow
Search for an existing component that matches or is close to the need (by name, by visual similarity, by folder convention).
If a close match exists: determine whether a new prop/variant on the existing component covers the need. Prefer this over a new component.
If no match exists: define the new component's:
Name (clear, specific, not vague).
Props: data props, variant/size props, event handlers, state props (loading, disabled, error, selected, etc.).
Build using existing tokens/primitives — no hard-coded colors, spacing, radii, shadows, or typography values.
Apply accessibility defaults: semantic HTML elements, keyboard support, ARIA only where semantics aren't enough, accessible labels, visible focus states.
Apply responsiveness if the component owns layout (see Responsive UI Skill).
Place the file correctly: shared components in /components (or project equivalent); component-level styles co-located with the component (e.g. CSS Modules file alongside it) unless the project convention differs.
Keep the component free of: API calls, route/navigation logic, and page-specific business logic — pass these in via props/handlers instead.
If extending, verify existing usages still work with the new prop/variant added as optional/additive.
Rules and Best Practices
Build reusable components only when the UI appears in more than one place or clearly belongs to the design system — don't over-abstract one-off UI.
Keep one component per UI concept; extend rather than duplicate.
Components should handle their own loading/disabled/error/empty visual states when relevant, driven by props.
Build reusable, accessible React components with predictable APIs and ref forwarding. Use when creating or refactoring components or defining component APIs, favoring composition over configuration and slots/children over many boolean props. Not needed for style-only or content-only edits that do not change a component API.