design-system
Skill4 starsChanged 15 days agoMITView on GitHub
Govern DESIGN.md tokens during UI edits, or audit, diff, export, inspect, migrate and initialize a design system. Enforce the existing token contract when present; absent DESIGN.md does not block ordinary UI work. Canonical CLI operations require their declared validator and report exact remediation when unavailable.
- Installs packages
192 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- caidanw/skillstheir own version, first seen Nov 8, 2026
- Adelie-Squad/solosquadtheir own version, first seen Nov 8, 2026
- darkweb19/skillstheir own version, first seen Nov 8, 2026
- dmoreq/agent-grimoiretheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
Used with
Projects with it also use setup-engine, team-level and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CoralGameSkillsetup-engine
Configure the project's game engine and version. Pins the engine in CLAUDE.md, detects knowledge gaps, and populates engine reference docs via WebSearch when the version is beyond the LLM's training data.
Also in 13 projects that use this
CoralGameSkillteam-level
Orchestrate level design team: level-designer + narrative-director + world-builder + art-director + systems-designer + qa-tester for complete area/level creation.
Also in 12 projects that use this
lilangMaxSkillcreate-stories
Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.
Also in 11 projects that use this
lilangMaxSkillstory-done
End-of-story completion review. Reads the story file, verifies each acceptance criterion against the implementation, checks for GDD/ADR deviations, prompts code review, updates story status to Complete, and surfaces the next ready story from the sprint.
Also in 11 projects that use this
- +2 more from CoralGame
- +6 more from lilangMax
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- nextlevelbuilder/ui-ux-pro-max-skill★ 147ksame name
- getsentry/sentry★ 46ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- ethereum/ethereum-org-website★ 6ksame name
- langwatch/langwatch★ 5ksame name
- joye61/pic-smaller★ 2.9ksame name
- daveebbelaar/bama★ 1.7ksame name
- reatom/reatom★ 1.4ksame name
- microsoft/power-platform-skills★ 1.1ksame name
182 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-creatorSkill
- apexSkill
- audio-loopSkill
- award-designSkill
- brand-voiceSkill
- claude-mdSkill
- code-ultrareviewSkill
- download-mediaSkill
- forgeSkill
- frontend-devSkill
- humanize-enSkill
- markitdownSkill
- notionSkill
- oneshotSkill
- scaffoldSkill
- suno-produceSkill
- ultrapexSkill
- video-loopSkill
- write-clear-readmeSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
When a DESIGN.md exists at the project root, read it before writing any UI code: every color, font, spacing value, corner radius, and …
- Very specific: line 56
If a legacy Stitch-format DESIGN.md is detected (9 numbered sections, ## Agent Prompt Guide heading, no YAML frontmatter): suggest …
- Very specific: line 94
Descriptive over technical: Write "whisper-soft shadow" alongside the exact value.
- Distinctive: line 98
Exact values are non-negotiable: Every color, dimension, component property is a concrete token.
- Very specific: line 105
Never use arbitrary Tailwind values (text-[13px], bg-[#abc]) when a token exists
- Distinctive: line 106
Use existing DESIGN.md tokens in code.
- Distinctive: line 135
When no subcommand is matched — either activated from its description during a UI edit, or invoked directly to discuss enforcement — follow …
- Distinctive: line 174
Update values, semantic names, reference paths
- Distinctive: line 180
Update CSS custom properties in the global stylesheet
- Distinctive: line 181
Update components using raw values — components referencing tokens by name pick up the new value automatically
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design System
Two modes for governing a project's visual identity:
- Auto-activate — when editing UI files (components, pages, layouts, styles,
DESIGN.md,tailwind.config.*) and aDESIGN.mdis present, the skill reads it first and enforces token-only sourcing for colors, typography, spacing, and corner radius. NoDESIGN.md? It stays out of the way — a one-line pointer to/award-designor/frontend-dev, no enforcement, no block on the edit. - Subcommands —
/design-system <verb> [path]exposes the full DESIGN.md lifecycle, built on the canonical@google/design.mdCLI.
Subcommand routing
Parse the first positional invocation argument. If it matches a verb below, load the referenced file and follow its workflow. Otherwise proceed with the token-enforcement workflow at the end of this document.
| First token | Mode | Reference |
audit (aliases: check, lint) | Lint + fix proposals, human-readable report | references/subcommand-audit.md |
diff | Regression check between versions (git-aware) | references/subcommand-diff.md |
export | Tokens → Tailwind theme or W3C DTCG tokens.json | references/subcommand-export.md |
spec | Emit the canonical spec from the installed CLI | references/subcommand-spec.md |
migrate | Port legacy Stitch 9-section DESIGN.md → Google standard | references/subcommand-migrate.md |
init | Scaffold a minimal valid DESIGN.md (fallback from /award-design) | references/subcommand-init.md |
audit-extensions | Bidirectional drift check — DESIGN.md extension YAML ↔ prose refs ↔ globals.css @theme | references/subcommand-audit-extensions.md |
| (none, or a UI file path) | Token enforcement — see the default workflow at the end | (this file) |
Source of truth
When a DESIGN.md exists at the project root, read it before writing any UI code: every color, font, spacing value, corner radius, and component style comes from this file — the YAML frontmatter tokens (normative values) or the prose explaining when and why to apply them.
No DESIGN.md? Step aside. The default governance mode neither requires nor creates one. It never blocks an edit for lack of a DESIGN.md and never invents a design direction — /award-design commits the direction and writes the DESIGN.md and build ladder; /frontend-dev or the authorized executor implements it. So:
- Building or editing UI with no file → proceed. For a designed build, point to
/award-designfor direction, then/frontend-devor the authorized executor for implementation; everyday UI work belongs to/frontend-devwhen installed. - A bare token scaffold is needed now and
/award-designis unavailable or not selected →/design-system init [archetype]is a minimal fallback, not the primary path.
Phrase the pointer as an optional handoff, never as a prerequisite: "Design System imposes no prerequisite here; use /award-design to define a new visual direction, then /frontend-dev to build it, if installed." Do not say the user must create DESIGN.md before editing.
If a legacy Stitch-format DESIGN.md is detected (9 numbered sections, ## Agent Prompt Guide heading, no YAML frontmatter): suggest /design-system migrate <path> to port it before proceeding.
The standard
DESIGN.md is Google's open format for describing a design system to coding agents. Canonical source: github.com/google-labs-code/design.md. A file has two layers:
- YAML frontmatter — machine-readable design tokens (
colors,typography,rounded,spacing,components). Normative values. - Markdown body — eight
##sections explaining rationale. Present sections must appear in order:
| # | Section | Aliases | YAML tokens |
| 1 | Overview | Brand & Style | — |
| 2 | Colors | — | colors: |
| 3 | Typography | — | typography: |
| 4 | Layout | Layout & Spacing | spacing: |
| 5 | Elevation & Depth | Elevation | — |
| 6 | Shapes | — | rounded: |
| 7 | Components | — | components: |
| 8 | Do's and Don'ts | — | — |
Full schema, token types, reference syntax, and consumer behavior for unknown content: references/design-md-spec.md. Concrete examples: references/example-claude.md (warm editorial), references/example-stripe.md (minimalist gradient).
Token references and schema (at a glance)
- Colors: any valid quoted CSS color; hex is the portable default —
primary: "#1A1C1E",accent: "oklch(0.7 0.2 200)" - Dimensions:
px/em/rem—48px,-0.02em,1.5rem - Typography: object —
fontFamily,fontSize,fontWeight,lineHeight,letterSpacing,fontFeature,fontVariation - Token references:
{path.to.token}wrapped in braces —"{colors.tertiary}","{rounded.sm}" - Component property tokens (the only accepted set):
backgroundColor,textColor,typography,rounded,padding,size,height,width - Variants (hover, active, pressed): separate entries with related keys —
button-primary,button-primary-hover
Recommended but non-normative names: primary, secondary, tertiary, neutral, surface, on-surface, error; headline-lg, body-md, label-sm; none, sm, md, lg, xl, full.
Writing principles
DESIGN.md is written for both agents and humans. These principles govern every section:
- Tokens are normative, prose is context. YAML values are what agents render. Prose tells them when and why. Both are required — prose without values is a mood board; values without prose is a spreadsheet.
- Descriptive over technical. Write "whisper-soft shadow" alongside the exact value. Translate CSS into spatial language —
rounded-full→ "pill-shaped". - Every value has a role.
#5e5d59alone is meaningless;Olive Gray (#5e5d59): secondary body text — warm medium-dark grayis actionable. - Name tokens semantically.
primary,tertiary,button-primary-hover— notblue-500,shadow-sm. - Show the personality in Overview. Section 1 sets the tone; every later section should feel written by the same person.
- Exact values are non-negotiable. Every color, dimension, component property is a concrete token.
Rules
- Colors, fonts, spacing, corner radius come only from DESIGN.md YAML tokens
- Map tokens to CSS custom properties in the global stylesheet
- Map tokens to
tailwind.config.ts theme.extend— or generate via/design-system export tailwind - Never use arbitrary Tailwind values (
text-[13px],bg-[#abc]) when a token exists - Use existing DESIGN.md tokens in code. An authorized token change updates DESIGN.md first, then propagates to code through the workflow below; do not invent inline values.
- Extended tokens — values outside the canonical 5 namespaces (
motion,shadows,aspectRatios,heights,containers,breakpoints,zIndex,borderWidths,opacity,scrollTriggers) live as top-level YAML namespaces, are validated by convention via/design-system audit-extensions, and are mirrored toglobals.css@theme. Upstream accepts unknown component properties with a warning, but this skill deliberately forbids using them to bind extension semantics because exporters and consumers do not share a contract for those keys. Reference extensions in prose instead (for example,{motion.duration-reveal-slow}). Seereferences/extended-tokens.md - Dark mode: the Google spec has no dedicated mode concept. Use semantic tokens in a single DESIGN.md (e.g.,
surface,on-surface,inverse-surface,inverse-on-surface) and let the framework's CSS custom properties map each semantic name to the right value per mode. The Google-publishedatmospheric-glassexample follows this pattern — one file, both modes via semantic naming. Avoid dual-file setups (DESIGN.md + DESIGN.dark.md) unless the brand truly diverges between modes - Shared brand across projects: same DESIGN.md, framework-specific implementation. Distribution patterns — pick one and document it in the applicable project instructions (
AGENTS.md,CLAUDE.md, or equivalent):- Monorepo —
packages/brand/DESIGN.mdconsumed by all apps; single PR for cross-cutting changes - Git submodule — canonical brand repo included as submodule; atomic updates via submodule bump
- Published package —
@org/design-tokenson npm with DESIGN.md + build outputs; versioned, works cross-repo - Copy + periodic
/design-system diff— copies in each repo; periodic diff against the canonical catches drift; simplest tooling, highest drift risk
- Monorepo —
- Monorepo: the spec and this skill assume a single root
DESIGN.mdper project. For monorepos with per-package brand variations, keep each package's DESIGN.md at the package root and pass the intended file explicitly (/design-system audit packages/web/DESIGN.md) - Post-edit invariant — after any DESIGN.md mutation (token update during the enforcement flow,
migrate,init, or manual edit via this skill), run/design-system audit <path>and surface findings. A mutation that leaves errors behind is not done - Duplicate section headings are a spec error — reject the file
- Unknown section headings are preserved. Unknown component properties receive an upstream warning and fail this skill's portability convention;
broken-refapplies only when a token reference does not resolve. Top-level keys resembling schema typos emitunknown-keywarnings
CLI validator
The canonical @google/design.md CLI powers audit, diff, export, and spec. Install it once with npm install --global --ignore-scripts @google/design.md, then verify designmd --version.
Agent operations use the bundled wrappers, which resolve one designmd binary from PATH, preflight its version, and validate operation output before reporting success. They never inspect project package manifests, invoke a package manager, or download at runtime.
The current CLI exposes eleven rules: broken-ref (error), missing-primary, contrast-ratio, orphaned-tokens, token-summary, missing-sections, missing-typography, section-order, unknown-key, token-like-ignored, and omitted-rules. Full semantics and severities: references/cli-reference.md.
For any non-ok wrapper status, surface remediation and rerun, then stop. A manual structural read is not an equivalent lint, diff, export, or spec result.
Framework behavior
Detect framework from config files (astro.config.*, next.config.*, etc.), then follow project instructions (AGENTS.md, CLAUDE.md, or equivalent) for implementation specifics (component library, font loading, file structure).
Default workflow — token enforcement
When no subcommand is matched — either activated from its description during a UI edit, or invoked directly to discuss enforcement — follow this workflow.
When there is no DESIGN.md
The default governance mode does not author a design file from scratch. When the user explicitly wants a DESIGN.md, it is born one of two ways:
/award-designauthors it (preferred) — it commits the direction and writes the full DESIGN.md and build ladder./frontend-devor the authorized executor builds it; design-system governs the result./design-system init [archetype]— a minimal token scaffold, only when/award-designis unavailable or not selected and a bare file is needed now.
Either way, once the file exists, the change flow below applies. Atmosphere scores (Density, Variance, Motion) live in Overview prose, not YAML.
How award-design's universe maps to DESIGN.md:
| award-design output | DESIGN.md section | YAML tokens |
| Archetype + atmosphere (Density/Variance/Motion) + signature moment + photography direction + copy register | 1. Overview (prose) | — |
| Color palette + photography colour guidance | 2. Colors | colors: |
| Typography + kinetic typography intent | 3. Typography | typography: |
| Spacing, grid, scroll choreography, responsive system | 4. Layout | spacing: + ext: breakpoints:, containers:, heights:, aspectRatios:, motion:, scrollTriggers: |
| Shadow language + depth narrative | 5. Elevation & Depth | ext: shadows:, borderWidths:, opacity: |
| Corner radius language | 6. Shapes | rounded: |
| Component specs + variants + micro-interactions + motion philosophy | 7. Components | components: (8 property tokens only) + ext: zIndex: |
| Archetype guardrails + AI-tell rejections + production-hardening rules | 8. Do's and Don'ts | — |
Extension namespaces (ext: rows above) live as top-level YAML per references/extended-tokens.md. Components bind only to the eight canonical property tokens — extension tokens are referenced in prose, never as components: keys.
Once the file exists (authored or scaffolded), wire it into the project:
- Audit — run
/design-system audit <path>(post-edit invariant). Fix errors before proceeding. - Wire into the framework:
/design-system export tailwind→ merge the result intotailwind.config.ts theme.extend(v3) orglobals.css@themeblock (v4); set up CSS custom properties in the global stylesheet. - Validate the mirror —
/design-system audit-extensions <path>confirms every extension token in the YAML has its CSS custom property and every prose reference resolves. Run after every export.
When UI/UX changes are requested
Any visual change — colors, typography, spacing, radius, shadows, component styles, layout, responsive behavior — follows this flow.
- Check whether the change affects tokens. New value, modified value, or altered visual system → DESIGN.md first. Pure layout bugs, alt text, content reordering → code only.
- Update DESIGN.md first.
- Open DESIGN.md, locate the affected YAML tokens and prose sections
- Update values, semantic names, reference paths
- Cascade — if the primary color changes, update every
components:entry referencing it - Sync Do's and Don'ts if the change contradicts an existing guardrail
- Audit —
/design-system audit <path>to verify no broken references or contrast regressions (post-edit invariant). - Propagate to code:
- Re-export Tailwind theme (
/design-system export tailwind) or updatetheme.extendby hand - Update CSS custom properties in the global stylesheet
- Update components using raw values — components referencing tokens by name pick up the new value automatically
- Re-export Tailwind theme (
- Shared brand — identify affected consumers. Propagate and run step 4 only in projects covered by the user's authorization; report other consumers and the change they need without editing them.
Examples of token-affecting changes:
- "Change CTA color" →
colors.*+ Colors prose + everycomponents:entry referencing the old color - "Make cards more rounded" →
rounded.*+ Shapes prose +components.card.rounded - "Darker theme" →
colors.*+ Overview + Elevation & Depth prose - "New badge component" →
components.*+ Components prose - "Increase section spacing" →
spacing.*+ Layout prose
Re-architecting
A fundamental visual change (new archetype, different atmosphere, complete restyle) is a new design, not a token update. Recommend or hand off to /award-design for the new direction, DESIGN.md and build ladder, then /frontend-dev or the authorized executor for implementation. If /award-design is unavailable or not selected, design-system steps aside and does not block the edit. Any existing DESIGN.md is replaced whole, never patched in place.
Gotchas
- Unknown component properties are not portable. The upstream parser accepts them with a warning, but downstream exporters and agents only share the eight canonical properties (
backgroundColor,textColor,typography,rounded,padding,size,height,width). Treat an extension key such asshadowas a skill-level failure even when upstream lint does not. Reference extension tokens in prose and mirror them to CSS instead. - Duplicate
##section heading breaks spec parsing silently. Two## Colorssections (from a botched re-architect) cause the parser to read only the first; YAML in the second is dropped without warning. Each of the 8 sections must appear exactly once. Fix: prescan for heading duplicates; fail hard with the duplicated name. export tailwindemits Tailwind v3 configuration JSON. Semantic token names are preserved and valid, but Tailwind v4 projects use CSS-first@themedeclarations instead oftheme.extend. Translate the exported entries into the global stylesheet and regenerate that mirror after DESIGN.md changes; do not paste the JSON into a v4 stylesheet.- Multiple DESIGN.md files make the target ambiguous. A monorepo may contain both
./DESIGN.mdand files such aspackages/*/DESIGN.md. Fix: when multiple candidates are detected, ask which one to govern. Never silently pick the root.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

