component-spec

component-spec is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 14 tokens per session (1,890 once invoked), scanned A, original, MIT.

A complete specification for a UI component covering user behaviour, visual structure, responsive states, and accessibility. It brings together UX, UI, and accessibility requirements before implementation.

In plain words
What is it for?
Use it to define components such as buttons or cards, including their purpose, use cases, interactions, variants, HTML semantics, keyboard controls, and screen-reader behaviour.
Why use it?
It prevents important interaction or accessibility details from being decided piecemeal during coding.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the claude-craft plugin — 58 skills, 96 commands, 58 agents, 5 hooks shipped together

Good fit Use it to define components such as buttons or cards, including their purpose, use cases, interactions, variants, HTML semantics, keyboard controls, and screen-reader behaviour.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/component-spec
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 58 skills, 96 commands, 58 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for component-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/component-spec/github.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/component-spec)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/component-spec"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/component-spec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for component-spec

Your own site · 80×15
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/component-spec"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/component-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.01890
Opus 5.5 $0.00006 $0.00756
Sonnet 5.5 $0.00003 $0.00378
Haiku 4.5 $0.00001 $0.00189

Measured 1mo ago against content hash 0d50bf08d858, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

component-spec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/uiux/component-spec.md · 261 lines

How it starts

The opening of the file, as written. The whole thing — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spécification Complète Composant UI/UX/A11y

Tu es l'Orchestrateur UI/UX. Tu dois produire une spécification complète d'un composant en mobilisant les 3 experts : UX pour le comportement, UI pour le visuel, A11y pour l'accessibilité.

Arguments

$ARGUMENTS

Arguments :

  • Nom du composant à spécifier
  • (Optionnel) Contexte d'usage

Exemple : /uiux:component-spec Button ou /uiux:component-spec "Card Séjour" contexte SaaS tourisme

MISSION

Étape 1 : Analyse UX (Expert UX)

Définir le comportement et l'usage :

  • Objectif du composant
  • Cas d'utilisation principaux
  • Interactions attendues
  • États fonctionnels

Étape 2 : Spécification UI (Expert UI)

Définir le visuel :

  • Anatomie et structure
  • Variantes
  • États visuels
  • Tokens utilisés
  • Responsive

Étape 3 : Spécification A11y (Expert A11y)

Exécuter /uiux:a11y-component {NOM} et reprendre sa spécification (sémantique HTML, attributs ARIA, navigation clavier, focus, contraste, annonces lecteur d'écran) dans la section ♿ de la synthèse. Ne pas la redéfinir ici.

Étape 4 : Synthèse

══════════════════════════════════════════════════════════════
📦 SPÉCIFICATION COMPOSANT : {NOM}
══════════════════════════════════════════════════════════════

Catégorie : Atom | Molecule | Organism
Date : {date}
Version : 1.0

──────────────────────────────────────────────────────────────
🧠 COMPORTEMENT (UX)
──────────────────────────────────────────────────────────────

### Objectif
{Description du rôle et de la valeur pour l'utilisateur}

### Cas d'utilisation
| Cas | Contexte | Comportement attendu |
|-----|----------|---------------------|
| Principal | {contexte} | {comportement} |
| Secondaire | {contexte} | {comportement} |

### États fonctionnels
| État | Déclencheur | Comportement |
|------|-------------|--------------|
| default | Initial | {comportement} |
| loading | Action en cours | {comportement} |
| success | Action réussie | {comportement} |
| error | Échec | {comportement} |
| empty | Pas de données | {comportement} |

### Feedback utilisateur
| Action | Feedback | Délai |
|--------|----------|-------|
| Click | {feedback} | Immédiat |
| Hover | {feedback} | Immédiat |
| Submit | {feedback} | < 200ms |

──────────────────────────────────────────────────────────────
🎨 VISUEL (UI)
──────────────────────────────────────────────────────────────

### Anatomie

┌─────────────────────────────────┐ │ [Icon] Label [Action] │ │ Description │ └─────────────────────────────────┘


- **Slot 1** : {description}
- **Slot 2** : {description}

### Dimensions
| Propriété | Mobile | Tablet | Desktop |
|-----------|--------|--------|---------|
| min-width | {val} | {val} | {val} |
| height | {val} | {val} | {val} |
| padding | {val} | {val} | {val} |

### Variantes
| Variante | Usage | Différences visuelles |
|----------|-------|----------------------|
| primary | CTA principal | {tokens} |
| secondary | Action secondaire | {tokens} |
| ghost | Action tertiaire | {tokens} |
| destructive | Suppression | {tokens} |

### États visuels
| État | Background | Border | Text | Autres |
|------|------------|--------|------|--------|
| default | --color-{x} | --color-{x} | --color-{x} | |
| hover | --color-{x} | --color-{x} | --color-{x} | cursor: pointer |
| focus | --color-{x} | --color-{x} | --color-{x} | outline: 2px |
| active | --color-{x} | --color-{x} | --color-{x} | transform |
| disabled | --color-{x} | --color-{x} | --color-{x} | opacity: 0.5 |
| loading | --color-{x} | --color-{x} | --color-{x} | spinner |

### Micro-interactions
| Trigger | Animation | Duration | Easing |
|---------|-----------|----------|--------|
| hover | {effect} | 150ms | ease-out |
| click | {effect} | 100ms | ease-in |
| focus | {effect} | 0ms | - |

### Tokens utilisés
```css
/* Couleurs */
--color-primary-500
--color-neutral-100
--color-error-500

Read the full file on GitHub · 261 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -4 lines 0d50bf08d858
  2. 3mo ago First seen · 265 lines · 14 tokens per session scan A 1595634ecc58

Subscribe to this mod's changes

component-spec is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (108 stars, last pushed 19d ago), licensed MIT. It adds 14 tokens to every session and 1,890 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

component-spec compared with commands from other repositories

component-spec next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
component-specTheBeardedBearSAS/claude-craftCommand10819d agoMITA14Claude Code
checklistgithub/spec-kitCommand154kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand154kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand154kyesterdayMITA13Claude Code
analyzegithub/spec-kitCommand154kyesterdayMITA26Claude Code
convergegithub/spec-kitCommand154kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand154kyesterdayMITA14Claude Code