design-md

Author, lint, and export Google's DESIGN.md design token specification files.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill design-md-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-md
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/creative/design-md
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill design-md-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @google/design.md.

What problem does it solve? Maintaining a consistent visual identity across projects and AI coding agents requires a single machine-readable source of truth for design tokens, but hand-written style guides drift, break WCAG contrast rules, and cannot be consumed programmatically. ## Core Features & Use Cases - Authoring DESIGN.md files: Generate spec-compliant files combining YAML design tokens (colors, typography, spacing, rounded corners, components) with human-readable rationale sections. - Linting and validation: Run the @google/design.md CLI to catch broken token references, WCAG AA contrast failures, out-of-order sections, and orphaned tokens. - Export and diffing: Convert DESIGN.md to Tailwind v3/v4 themes or W3C DTCG JSON, and diff two versions to detect regressions. - Use Case: A team wants every AI-generated UI to follow their brand. They author one DESIGN.md with their palette and typography, lint it for contrast compliance, and export a Tailwind theme so all projects share the same tokens. ## Quick Start Create a DESIGN.md design token spec for my brand with a blue accent color and Inter typography, then lint it and export a Tailwind theme.

Frequently Asked Questions about design-md

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a DESIGN.md design token file?

Write a Markdown file with YAML frontmatter containing version, name, colors, typography, rounded, spacing, and components tokens, followed by canonical prose sections like Overview and Colors. Quote hex colors and negative dimensions so YAML parses them correctly.

How do I validate design tokens for WCAG contrast?

Run npx -y @google/design.md lint DESIGN.md to check component textColor against backgroundColor for WCAG AA 4.5:1 contrast. The linter also reports broken token references, missing primary colors, and section order issues.

Can I export DESIGN.md tokens to Tailwind?

Yes, the CLI exports to Tailwind v3 theme JSON with --format json-tailwind, a Tailwind v4 CSS @theme block with --format css-tailwind, and W3C DTCG JSON with --format dtcg. Run lint separately since export succeeds regardless of lint findings.

Why does my DESIGN.md lint fail on token references?

Token references must use full dotted paths like {colors.primary}; shorthand like {primary} does not resolve. The broken-ref error means the referenced path does not exist in your token definitions.

How should component variants like hover states be defined?

Define variants as separate sibling component entries such as button-primary-hover, never as nested keys like button-primary.hover. Component properties are limited to a whitelist including backgroundColor, textColor, typography, rounded, and padding.

Does the design.md CLI work on Windows?

On Windows the design.md bin name can collide with the .md file association, causing silent no-ops. Use the dot-free alias instead: npx -y -p @google/design.md designmd lint DESIGN.md.