Agent skill

Design Component Skill: Component Specs with Eight States

The design-component skill makes an AI coding agent write a component spec with anatomy, variants, sizes, eight states, token mapping and accessibility, then prove each state with scripted gates.

Install
/plugin marketplace add plugin87/ux-ui-agent-skills
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the design-component skill?

The design-component skill is a SKILL.md in the plugin87/ux-ui-agent-skills kit. It has the agent produce a spec-level design for a button, input, tabs, toast or modal: anatomy, variants, sizes, eight states, token mapping and accessibility. It reads the kit's token and ARIA files and runs contrast and axe gates.

The design-component skill lives in the plugin87/ux-ui-agent-skills repository, a kit of design tokens, rules, scripts and runnable skills. Its job is narrow: design a UI component to a spec before or alongside the code.

The SKILL.md names the components it expects, including button, input, tabs, toast, combobox, date picker and modal. For framework code, it hands off to a sibling skill called design-code instead.

What the spec contains

  • An anatomy diagram and a variants table.
  • A sizes table drawn from the kit's sizing tokens.
  • Every applicable state of the eight: default, hover, focus, active, disabled, loading, error and selected.
  • A token mapping, so each value points at a token rather than a hardcoded number.
  • Accessibility notes covering role, keyboard behavior and screen reader behavior.

How it keeps the spec honest

The skill asks for a states harness, one HTML file rendering each variant in each state. It then expects the agent to run the contrast, axe and render scripts and report their real output, in light and in dark.

Passing gates are not treated as proof. The skill tells the agent to screenshot the harness and look at it, because a checkbox that never toggles or an off-center glyph can pass every contrast check.

Who the design-component skill is for

Best for

  • Teams documenting a component library who want one repeatable spec format, matched to the existing atoms, molecules and organisms files.
  • Agent users who keep getting components with a nice resting state and broken hover, focus or loading behavior.
  • Anyone who needs contrast, ARIA and overflow checks run rather than assumed.

Not for

  • Installing only the skill folder. Its first step checks for the kit's tokens folder and stops with a message if the kit is missing.
  • Whole pages or dashboards. For layout review of a built page, see ui-design-review.
  • Choosing a visual direction or brand. The skill applies the kit's own taste rules, which you would have to override.

Use it with UiChemy

A component spec stays in the design layer. If your finished components live in Figma, UiChemy Figma to WordPress turns the frames into editable pages. Read atomic design basics first, then click Get Started on uichemy.com.