hermes

Write a design-system component spec

Writes a design-system component spec covering anatomy, variants, states, behaviour, tokens, content rules, dos and don'ts, and accessibility. Use when adding or documenting a component.

context

Component docs often show the happy-path picture and a props table, and leave out what matters for consistent use: when not to use it, what every state looks like, how it behaves with a keyboard and a screen reader, which tokens it reads, and what to do with long or translated text. Teams then rebuild the same component three ways. A good spec is the single source both designers and engineers build from.

task

Write the spec for the ph:component component. Only if [CONTEXT] is given:

context from user

  1. Overview: what it is for in one sentence, when to use it, and when not to (name the component to use instead).
  2. Anatomy: numbered parts (container, label, icon, and so on), each marked required or optional.
  3. Variants and sizes: each variant with the job it does. Keep the set minimal; if two variants differ only cosmetically, propose merging them. Give sizes with the minimum target size each must keep.
  4. States: default, hover, focus-visible, active or pressed, disabled, and those that apply (selected, loading, error, read-only, expanded). Say what changes visually and what the disabled state communicates, and whether a disabled control should instead stay enabled and explain why it cannot act.
  5. Behaviour: interactions with mouse, touch and keyboard, timing (for example auto-dismiss and how pausing works), overflow and truncation, responsive behaviour, and motion with a reduced-motion alternative.
  6. Content: label rules, length limits, casing, icon use, and how it handles long, empty and translated text (allow about 30 to 40 percent expansion).
  7. Tokens: a table of the semantic tokens each part uses. Use the system's token names if given; otherwise propose names following {category}.{property}.{variant}.{state} and mark them "proposed". Never hard-code raw values.
  8. Accessibility: the native element or WAI-ARIA Authoring Practices pattern it should follow, role and accessible name, keyboard map, focus management, announcements for dynamic changes, contrast and target-size requirements, and what must not rely on colour alone.
  9. Dos and don'ts: 4 to 8 pairs, each a concrete situation, not a general principle.
  10. Related components and how to choose between them.
  11. If the component name is ambiguous (a "card" can be a container or an interactive tile), state the interpretation you chose, or ask if the difference would change most of the spec.
constraints
  • Prefer native platform elements over custom ARIA. If ARIA is needed, specify it completely.
  • Do not invent the system's existing tokens, components or values. Mark anything you propose as "proposed".
  • Keep it implementation-neutral: describe behaviour and properties, not one framework's code.
  • Separate what you verified from what you inferred. Mark inferences as such.
  • When you do not know, say "I don't know" once and state what would settle it.
output format

Markdown with the sections from the contract, in order. Use tables for anatomy, variants, states, tokens and the keyboard map. End with Open questions.

1 required value still a placeholder; the assistant will ask for it.

details

kind
Prompt: a task you run by name to get one finished thing back
domain
Design
category
Design systems
level
Intermediate
made for
Product / UX / UI designer, Frontend engineer
risk
read-only
version
v1.0.0 · incubating
reviewed
2026-10-02
works in
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md, ChatGPT, claude.ai

Edit on GitHubReport a problem

use in

Hodios CLI
npx @hermes-hq/hodios install write-component-spec --target claude-code
Agent Skills
npx skills add hermes-hq/hodios-dist --skill write-component-spec -a claude-code
Add the Hodios marketplace (once)
claude plugin marketplace add hermes-hq/hodios-dist
Install the design plugin
claude plugin install hodios-design@hodios

The plugin brings every entry in this domain at once.

pairs well with

All of Design systems
PromptDesign systems

Define a design token architecture

Designs a three-tier design token architecture (primitive, semantic, component) with naming conventions, theming rules and a sample token file. Use when starting or restructuring a design system.

define-design-tokens
PromptDesign systems

Audit design consistency across screens

Inventories spacing, type, colour, radii and component variants across screens, finds near-duplicates and plans their consolidation. Use before building or cleaning up a design system.

audit-design-consistency
PromptUI design

Write a text wireframe spec

Writes a low-fidelity text wireframe for one screen with layout regions, components, content hierarchy, all states and responsive behaviour. Use before visual design or to brief a developer.

create-wireframe-spec
PersonaUI design

Product designer

Product designer who frames the problem before the pixels, explores several options, designs every state and defends decisions with user evidence. Use as a design partner or reviewer.

product-designer
PersonaAccessibility

Accessibility specialist

Accessibility specialist who builds and reviews with WCAG, the ARIA Authoring Practices and real assistive-technology behaviour in mind, ranking barriers by who is blocked.

accessibility-specialist
PromptDesign systems

Define an icon system

Defines an icon system with grid and keylines, stroke and corner rules, sizes, naming, metaphors, accessibility and contribution rules. Use when a design system creates or tidies up its icons.

define-iconography