generate-design-md

generate-design-md is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 33 tokens per session (1,169 once invoked), scanned A, original, MIT.

A command that creates a DESIGN.md file as a project-wide reference for the visual system. It can start from a template or collect existing values from Tailwind, CSS, Sass, or design-token files.

In plain words
What is it for?
Use it to document colours, fonts, spacing, responsive breakpoints, and other existing interface settings.
Why use it?
It gives developers and coding agents one place to find the project's visual rules, reducing inconsistencies between screens.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Good fit Use it to document colours, fonts, spacing, responsive breakpoints, and other existing interface settings.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/generate-design-md
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 56 skills, 94 commands, 47 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 generate-design-md

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-design-md/github.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-design-md)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-design-md"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-design-md/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 generate-design-md

Your own site · 80×15
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-design-md"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-design-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 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,169 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.00033 $0.01169
Opus 5 $0.00016 $0.00584
Sonnet 5 $0.00007 $0.00234
Haiku 4.5 $0.00003 $0.00117

Measured 5d ago against content hash 4326959f9baf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

generate-design-md 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 5d 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/generate-design-md.md · 136 lines

How it starts

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

Generate DESIGN.md

Crée un fichier DESIGN.md à la racine du projet pour servir de source de vérité du design system, lu par tous les agents IA (voir skill design-md-convention).

Quand utiliser

  • Nouveau projet avec UI
  • Projet existant sans DESIGN.md (et donc inconsistances UI fréquentes)
  • Migration d'un design system Figma vers format AI-friendly

Usage

# Copie simple du template (à remplir manuellement)
/uiux:generate-design-md

# Pré-remplir depuis tailwind.config.*
/uiux:generate-design-md --from-tailwind

# Pré-remplir depuis fichier de tokens JSON
/uiux:generate-design-md --from-tokens=./design-tokens.json

# Mode interactif (questions ciblées)
/uiux:generate-design-md --interactive

Processus

1. Vérification

# Check si DESIGN.md existe déjà
if [[ -f "DESIGN.md" ]]; then
  echo "⚠️  DESIGN.md existe déjà. Utiliser --force pour écraser."
  exit 1
fi

2. Détection des sources UI

Auto-détecter ce qui est déjà défini :

  • tailwind.config.{js,ts,mjs} → extraire theme.colors, fontFamily, fontSize, spacing, screens
  • design-tokens.json / tokens.json → W3C Design Tokens format
  • src/styles/_variables.scss / styles.css avec :root { --color-* }
  • theme.ts (Chakra, Mantine, MUI)

3. Copie du template

Base : .claude/templates/DESIGN.md.template (7 sections obligatoires).

4. Pré-remplissage intelligent

Si --from-tailwind :

  • Parser tailwind.config.* via tw-loader ou lecture JSON
  • Mapper les couleurs vers color.{role}.{shade}
  • Extraire les breakpoints vers la section grille
  • Extraire les fontSize vers la section typographie

Si --from-tokens :

  • Respecter le format W3C Design Tokens (W3C Community Group spec)
  • Mapper {color.primary.500.value} vers tokens DESIGN.md

5. Mode interactif

Si --interactive, poser ces questions à l'utilisateur :

  1. Personnalité du produit : professionnel / moderne / chaleureux / minimaliste ?
  2. Couleur primaire : hex ou choix dans palette Tailwind ?
  3. Font principale : système / Google Font / custom ?
  4. Niveau accessibilité cible : WCAG 2.2 AA (standard) ou AAA (strict) ?
  5. Library composants existante : aucune / shadcn/ui / MUI / Chakra / Mantine / custom ?

Read the full file on GitHub · 136 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. 5d ago First seen · 136 lines · 33 tokens per session scan A 4326959f9baf

Subscribe to this mod's changes

generate-design-md is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 6d ago), licensed MIT. It adds 33 tokens to every session and 1,169 once invoked, about $0.0002 per session on Opus 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.