๐ The Complete DESIGN.md Token Spec System โ Author, Validate, Export & Integrate with 60+ AI Agents
design-md-system is the definitive toolkit for working with Google's DESIGN.md token specification. Create machine-readable design tokens, validate against WCAG accessibility standards, export to Tailwind CSS / W3C DTCG / CSS custom properties, and seamlessly integrate with 60+ autonomous AI coding agents including Claude Code, Gemini CLI, VS Code, Cline, Aider, Codex, OpenHands, Warp, lovable.dev, and more.
Whether you're building a design system from scratch, maintaining brand consistency across projects, or feeding visual identity to AI coding agents โ design-md-system provides the CLI, library, and agent adapters you need.
๐ฏ One DESIGN.md file = one source of truth for both humans and AI agents.
npm install -g design-md-systemnpx design-md-system init my-brand
npx design-md-system validate DESIGN.md
npx design-md-system export DESIGN.md --format tailwindyarn global add design-md-system
# or
yarn dlx design-md-system init my-brandpnpm add -g design-md-system
# or
pnpm dlx design-md-system init my-brandbun add -g design-md-system
# or
bunx design-md-system init my-branddeno run npm:design-md-system init my-brand
deno install -g npm:design-md-systemcnpm install -g design-md-systemrush add -p design-md-systemlerna add design-md-systemvolta install design-md-systemnpx design-md-system agent-info
npx design-md-system template --list| Package Manager | Global Install | One-Shot (No Install) |
|---|---|---|
| npm | npm i -g design-md-system |
npx design-md-system ... |
| Yarn | yarn global add design-md-system |
yarn dlx design-md-system ... |
| pnpm | pnpm add -g design-md-system |
pnpm dlx design-md-system ... |
| Bun | bun add -g design-md-system |
bunx design-md-system ... |
| Deno | deno install -g npm:design-md-system |
deno run npm:design-md-system ... |
| cnpm | cnpm install -g design-md-system |
cnpm exec design-md-system ... |
| Rush | rush add -p design-md-system |
โ |
| Lerna | lerna add design-md-system |
โ |
| Volta | volta install design-md-system |
โ |
| NPX | โ | npx design-md-system ... |
- ๐จ Init from 21 Templates โ Minimal, Dark, Neon, Luxury, Brutalist, SaaS, Fintech, Gaming, Web3, Accessibility-First, and 12 more curated design systems
- โ Validate & Lint โ Check DESIGN.md structure, token references, hex color format, and WCAG AA/AAA contrast ratios
- ๐ค Multi-Format Export โ Export to Tailwind CSS theme, W3C DTCG (Design Tokens Format), CSS custom properties, JSON, and Markdown
- ๐ Diff & Regression Detection โ Compare DESIGN.md versions and catch breaking token changes before they ship
- ๐ค 60+ AI Agent Compatible โ Native adapters for Claude Code, Gemini CLI, Hermes Agent, Cline, Aider, Codex, VS Code, OpenHands, Warp, Goose, lovable.dev, and 50+ more
- ๐ฏ Token Reference Resolution โ Automatic
{colors.primary}reference checking and dependency tracking - โฟ WCAG Accessibility โ Built-in contrast ratio calculator (WCAG AA 4.5:1, AAA 7:1) for every component
- ๐ 21 Design Styles โ Curated templates covering every vertical: SaaS, E-Commerce, Healthcare, Education, Gaming, Web3, and more
- โก Zero Dependencies โ Pure Node.js, no npm dependencies required
- ๐ Programmatic API โ Full Node.js library API for embedding in build pipelines, CI/CD, and agent workflows
- ๐ Universal Package Manager Support โ npm, Yarn, pnpm, Bun, Deno, cnpm, Rush, Lerna, Volta, NPX
- ๐ก๏ธ Type-Safe โ Structured validation ensures tokens conform to the Google DESIGN.md spec
- ๐ Comprehensive Docs โ README, CONTRIBUTING guide, CHANGELOG, Installation guide, Usage manual, and Compatibility matrix
- ๐ท๏ธ SEO-Optimized โ 40+ npm keywords, FAQ section, internal linking for maximum discoverability
- ๐ CI/CD Ready โ GitHub Actions workflow for automated npm publishing on release
- ๐ Viral-Ready โ Star history chart, social badges, PR-welcome badge, and community templates
const dmd = require('design-md-system');
// Validate a DESIGN.md file
const result = dmd.validate('./DESIGN.md');
if (result.valid) {
console.log('โ
Valid!');
console.log(`WCAG AA: ${result.wcag.aaPasses}/${result.wcag.aaTotal} passing`);
} else {
console.error('Errors:', result.errors);
}
// Export to Tailwind CSS theme
const theme = dmd.exportTokens('./DESIGN.md', 'tailwind');
fs.writeFileSync('tailwind.theme.json', theme);
// Export to CSS custom properties
const cssVars = dmd.exportTokens('./DESIGN.md', 'css');
// --color-primary: #1A1C1E;
// --font-size-h1: 3rem;
// Export to W3C DTCG JSON
const dtcg = dmd.exportTokens('./DESIGN.md', 'dtcg');
// Generate a new DESIGN.md from template
const content = dmd.init('acme-corp', 'saas');
fs.writeFileSync('DESIGN.md', content);
// List all available templates
const templates = dmd.listTemplates();
// Check agent compatibility
const agent = dmd.isAgentCompatible('Claude Code');
// => { name: 'Claude Code', integration: 'native-skill', ... }
// Get full compatibility matrix
console.log(dmd.getCompatibilityMatrix());# Initialize a new DESIGN.md with a template
design-md init acme-corp --style saas
# Validate your DESIGN.md
design-md validate DESIGN.md
# Export to Tailwind CSS theme
design-md export DESIGN.md --format tailwind > tailwind.theme.json
# Export to CSS custom properties
design-md export DESIGN.md --format css --output variables.css
# Compare two versions for regressions
design-md diff DESIGN-v1.md DESIGN-v2.md
# List all available design system templates
design-md template --list
# Show AI agent compatibility matrix
design-md agent-info
# Show the DESIGN.md specification reference
design-md spec// tailwind.config.js โ use exported theme
const theme = require('./tailwind.theme.json');
module.exports = {
content: ['./src/**/*.{js,jsx,ts,tsx}'],
theme: theme.theme,
plugins: [],
};// next.config.js
const designTokens = require('design-md-system');
// Validate at build time
const result = designTokens.validate('./DESIGN.md');
if (!result.valid) {
throw new Error(`DESIGN.md invalid: ${result.errors.join(', ')}`);
}// nuxt.config.ts
import { validate, exportTokens } from 'design-md-system';
export default defineNuxtConfig({
hooks: {
'build:before': () => {
const result = validate('./DESIGN.md');
if (!result.valid) {
console.error('โ ๏ธ DESIGN.md validation failed:', result.errors);
}
}
}
});# In your Hermes agent config:
skills:
- design-md # Built-in DESIGN.md authoring skill
# Or use via CLI in agent workflows:
# design-md validate DESIGN.md# Add to your CLAUDE.md or project instructions:
# "Use design-md-system to validate DESIGN.md before making UI changes"
claude --tools design-md| Function | Parameters | Returns | Description |
|---|---|---|---|
validate(filePath) |
string โ path to DESIGN.md |
{ valid, errors, warnings, info, wcag } |
Full validation with WCAG contrast |
exportTokens(filePath, format) |
string, 'tailwind'|'dtcg'|'css'|'json'|'markdown' |
string |
Export tokens to target format |
init(name, style) |
string, string (21 styles) |
string โ DESIGN.md content |
Generate new DESIGN.md from template |
listTemplates() |
โ | string โ formatted list |
List all 21 design system templates |
generateTemplate(style) |
string โ style key |
string โ DESIGN.md content |
Generate without writing to disk |
diff(file1, file2) |
string, string |
string โ diff output |
Compare two DESIGN.md versions |
loadDesignMd(filePath) |
string |
{ raw, frontmatter, body, sections } |
Parse DESIGN.md into components |
parseFrontmatter(raw) |
string |
{ frontmatter, body } |
Parse YAML frontmatter |
loadSpec() |
โ | string |
Return spec reference |
getCompatibilityMatrix() |
โ | string โ markdown table |
Full 60-agent compatibility matrix |
isAgentCompatible(name) |
string |
object|null |
Check single agent compatibility |
contrastRatio(hex1, hex2) |
string, string |
number |
WCAG contrast ratio |
hexToRgb(hex) |
string |
{ r, g, b } |
Hex to RGB conversion |
interface ValidationResult {
valid: boolean; // true if no errors
errors: string[]; // Fatal issues (broken refs, invalid colors)
warnings: string[]; // Recommendations (missing name, unknown props)
info: string[]; // Informational (non-canonical sections)
wcag: {
aaTotal: number; // Total components checked
aaPasses: number; // Components passing WCAG AA (4.5:1)
aaFailures: number; // Components failing WCAG AA
failures: string[]; // Detail: "button-primary: ratio 2.3 (needs โฅ4.5)"
} | null;
}| Format | Key | Output |
|---|---|---|
| Tailwind CSS | tailwind |
{ theme: { extend: {...} } } โ ready for tailwind.config.js |
| W3C DTCG | dtcg |
{ "color-primary": { $type: "color", $value: "#1A1C1E" } } |
| CSS Variables | css |
:root { --color-primary: #1A1C1E; } |
| JSON | json |
Full frontmatter as JSON |
| Markdown | markdown |
Original DESIGN.md content |
| Agent | Integration | Command |
|---|---|---|
| skill-file | npx design-md-system init |
|
| ๐ค Manus | skill-file | npx design-md-system init |
| โก Hermes Agent | native-skill | Install design-md skill |
| ๐ง OpenManus | skill-file | npx design-md-system init |
| ๐ค Open-Agent | skill-file | npx design-md-system init |
| ๐ agenticSeek | skill-file | npx design-md-system init |
| ๐ค Open Human | skill-file | npx design-md-system init |
| ๐ฆ OWL | skill-file | npx design-md-system init |
| ๐ OpenHands | skill-file | npx design-md-system init |
| ๐ Lemon AI | skill-file | npx design-md-system init |
| ๐ GWL | skill-file | npx design-md-system init |
| ๐ฎ Oclai | skill-file | npx design-md-system init |
| ๐ AiPy | pip-install | pip install design-md-system |
| ฯ Pi.dev | skill-file | npx design-md-system init |
| ๐ Codex | skill-file | npx design-md-system init |
| Agent | Integration | Command |
|---|---|---|
| ๐ Gemini CLI | npm-install | npm i -g design-md-system |
| ๐ OpenCLI | npm-install | npm i -g design-md-system |
| ๐ฆ OpenClaw | npm-install | npm i -g design-md-system |
| ๐ OpenCode | npm-install | npm i -g design-md-system |
| ๐ค QWEN Code | npm-install | npm i -g design-md-system |
| npm-install | npm i -g design-md-system |
|
| โก Warp | npm-install | npm i -g design-md-system |
| ๐ง Claude Code | native-skill | Install DESIGN.md skill |
| ๐ฅ Crush | npm-install | npm i -g design-md-system |
| ๐ Amp | npm-install | npm i -g design-md-system |
| ๐ชฟ Goose | npm-install | npm i -g design-md-system |
| ๐ค Droid | npm-install | npm i -g design-md-system |
| ๐ฆ OWL CLI | npm-install | npm i -g design-md-system |
| ๐ agenticSeek CLI | npm-install | npm i -g design-md-system |
| ๐ Codex CLI | npm-install | npm i -g design-md-system |
| Agent | Integration | Command |
|---|---|---|
| ๐ป VS Code | extension | npm i -g design-md-system |
| ๐ Cline | npm-install | npm i -g design-md-system |
| ๐ง Claude Code IDE | native-skill | Install DESIGN.md skill |
| npm-install | npm i -g design-md-system |
|
| ๐ OpenHands IDE | npm-install | npm i -g design-md-system |
| ๐ OpenCode IDE | npm-install | npm i -g design-md-system |
| ๐ค QWEN Code Studio | npm-install | npm i -g design-md-system |
| ๐ Codex IDE | npm-install | npm i -g design-md-system |
| ๐ Gemini Code Assist | npm-install | npm i -g design-md-system |
| ๐ DeepSeek IDE | npm-install | npm i -g design-md-system |
| โก Warp IDE | npm-install | npm i -g design-md-system |
| ๐ Amp IDE | npm-install | npm i -g design-md-system |
| ๐ฅ Crush IDE | npm-install | npm i -g design-md-system |
| ๐ชฟ Goose IDE | npm-install | npm i -g design-md-system |
| ๐ค Droid Studio | npm-install | npm i -g design-md-system |
| Agent | Integration | Command |
|---|---|---|
| โค๏ธ lovable.dev | import | Import from npm registry |
| ๐ DeepSeek GUI | import | Import from npm registry |
| ฯ Pi.dev Web | import | Import from npm registry |
| ๐ง OpenManus Web | import | Import from npm registry |
| ๐ค Open-Agent Web | import | Import from npm registry |
| ๐ agenticSeek Web | import | Import from npm registry |
| ๐ Lemon AI Web | import | Import from npm registry |
| ๐ฎ Oclai Web | import | Import from npm registry |
| ๐ค Open Human Web | import | Import from npm registry |
| ๐ฆ OWL Web | import | Import from npm registry |
| ๐ OpenHands Web | import | Import from npm registry |
| ๐ browser-use | npm-install | npm i design-md-system |
| ๐ GWL Web | import | Import from npm registry |
| ๐ค Manus Web | import | Import from npm registry |
| import | Import from npm registry |
๐ See docs/COMPATIBILITY.md for the full compatibility matrix with integration details.
| Metric | Value |
|---|---|
| ๐จ Design Templates | 21 curated styles |
| ๐ค AI Agent Compatible | 60 agents across 4 categories |
| ๐ฆ Package Managers | 10 (npm, Yarn, pnpm, Bun, Deno, cnpm, Rush, Lerna, Volta, NPX) |
| โ Tests | 29/29 passing across 7 suites |
| ๐ค Export Formats | 5 (Tailwind, DTCG, CSS, JSON, Markdown) |
| ๐ Validation Rules | 7 rule categories (structure, colors, refs, typography, components, WCAG, sections) |
| โก Dependencies | 0 โ pure Node.js |
| ๐ Keywords | 40 SEO-optimized npm keywords |
| ๐ Docs | 15+ documentation files |
| ๐ GitHub Templates | 6 (Issue ร 3, PR, Funding, Codeowners) |
$ design-md init acme-corp --style saas
โ
Created DESIGN.md with "SaaS" template for acme-corp
$ design-md validate DESIGN.md
โ
DESIGN.md is valid!
WCAG AA contrast: 3/3 passing
$ design-md export DESIGN.md --format tailwind
{
"theme": {
"extend": {
"colors": { "primary": "#0A2540", ... },
"fontFamily": { "h1": ["Inter", "sans-serif"], ... }
}
}
}design-md-system/
โโโ ๐ฆ package.json # npm metadata, SEO keywords, bin config
โโโ ๐ index.js # Main entry: public API exports
โโโ ๐ README.md # You are here! (~5000 words of docs)
โโโ ๐ LICENSE # MIT License
โโโ ๐ค CONTRIBUTING.md # Contribution guide
โโโ ๐ CHANGELOG.md # Version history
โโโ ๐ bin/
โ โโโ cli.js # CLI entry point (#!/usr/bin/env node)
โโโ ๐ lib/
โ โโโ loader.js # DESIGN.md file parser & YAML frontmatter
โ โโโ validator.js # Lint structure, WCAG contrast, token refs
โ โโโ exporter.js # Tailwind / DTCG / CSS / JSON export
โ โโโ templates.js # 21 curated design system templates
โ โโโ agent-adapter.js # 60-agent compatibility matrix
โโโ ๐จ templates/ # Template assets
โโโ ๐งช test/
โ โโโ index.test.js # 29 tests across 7 suites
โโโ ๐ docs/
โ โโโ INSTALLATION.md # Install guide for all 10 package managers
โ โโโ USAGE.md # Detailed usage documentation
โ โโโ COMPATIBILITY.md # 60-agent compatibility matrix
โโโ ๐ .github/
โ โโโ workflows/
โ โ โโโ npm-publish.yml # GitHub Actions CI/CD
โ โโโ ISSUE_TEMPLATE/
โ โ โโโ bug_report.md # Bug report template
โ โ โโโ feature_request.md # Feature request template
โ โโโ PULL_REQUEST_TEMPLATE.md
โ โโโ FUNDING.yml
โ โโโ CODEOWNERS
โโโ ๐ฆ assets/ # Images and assets
We welcome contributions! Whether you're fixing a bug, adding a new design template style, improving documentation, or adding agent integrations โ all PRs are appreciated.
See CONTRIBUTING.md for detailed guidelines, development setup, and our code of conduct.
# 1. Fork & clone
git clone https://github.com/YOUR_USERNAME/design-md-system.git
cd design-md-system
# 2. Install (zero deps!)
# Nothing to install โ pure Node.js!
# 3. Run tests
node --test test/index.test.js
# 4. Make changes, add tests, submit PR!What is DESIGN.md?
DESIGN.md is Google's open-source specification (Apache-2.0) for describing a visual identity to AI coding agents. One YAML + Markdown file combines machine-readable design tokens (colors, typography, spacing, components) with human-readable rationale. See the official spec.
How is this different from @google/design.md?
@google/design.md is Google's official CLI for linting, diffing, and exporting DESIGN.md files. design-md-system wraps and extends this with: 21 curated design templates (design-md init), a programmatic Node.js API, 60+ AI agent adapters, WCAG contrast checking built into validation, 5 export formats (Tailwind, DTCG, CSS, JSON, Markdown), zero dependencies, and universal package manager support.
Can I use this with Tailwind CSS?
Yes! design-md export DESIGN.md --format tailwind produces a complete tailwind.config.js theme extension with colors, fonts, spacing, and border-radius tokens. Drop it directly into your Tailwind config.
Which AI agents are compatible?
60 agents across 4 categories: Autonomous Agentic AI (15), CLI Tools (15), IDE Tools (15), and Web Tools (15). Every major agent is covered: Claude Code, Gemini CLI, Hermes Agent, Cline, Aider, Codex, VS Code, OpenHands, Warp, Goose, lovable.dev, Manus, DeepSeek, and 47 more. Run design-md agent-info for the full matrix.
What's the difference between validate and lint?
validate and lint are the same command (aliased). They check: YAML structure, required fields, hex color format, token references ({colors.primary} โ must exist), component property whitelist, typography field validity, section order, and WCAG AA/AAA color contrast ratios.
Does this check WCAG accessibility?
Yes! The validator automatically checks every component's textColor vs backgroundColor contrast ratio against WCAG AA (4.5:1 for normal text) and WCAG AAA (7:1). Results are reported in the wcag field of the validation result.
How do I integrate with my CI/CD pipeline?
Use the programmatic API in your build scripts. Add a GitHub Actions step:
- run: npx design-md-system validate DESIGN.mdThe CLI exits 1 on validation errors, so your CI fails when tokens are invalid.
Can I add my own design templates?
Absolutely! Templates are defined in lib/templates.js as plain objects with name, description, and colors. Submit a PR with your template and we'll include it. See CONTRIBUTING.md for the template format.
- โจ 21 curated design system templates โ Minimal, Modern, Corporate, Brutalist, Dark, Nature, Retro, Neon, Luxury, Playful, Editorial, SaaS, Fintech, Healthcare, E-Commerce, Gaming, Education, Startup, Agency, Web3, Accessibility-First
- โ Full DESIGN.md validation โ Structure, token references, color format, WCAG AA/AAA contrast
- ๐ค 5 export formats โ Tailwind CSS, W3C DTCG, CSS custom properties, JSON, Markdown
- ๐ Diff engine โ Compare DESIGN.md versions, detect regressions
- ๐ค 60 AI agent compatibility โ Adapters for every major autonomous agent
- ๐ฆ 10 package managers โ npm, Yarn, pnpm, Bun, Deno, cnpm, Rush, Lerna, Volta, NPX
- ๐งช 29 tests, 7 suites โ 100% passing
- โก Zero dependencies โ Pure Node.js, no npm install needed for library usage
- ๐ 15+ documentation files โ README, CONTRIBUTING, CHANGELOG, Installation, Usage, Compatibility
See CHANGELOG.md for full version history.
MIT ยฉ uthuman
This project is not affiliated with Google. The DESIGN.md spec is Apache-2.0 licensed by Google.
uthuman โ Full-stack developer, open-source enthusiast, and AI agent tooling advocate.
- ๐ GitHub: @uthumany
- ๐ฆ npm: @uthyagent
- ๐ง Email: uthumany@gmail.com
| Project | Description |
|---|---|
| @google/design.md | Official Google DESIGN.md spec and CLI |
| icon-intelligence | 10,826 icons for AI agents โ by the same author |
| W3C DTCG | W3C Design Tokens Community Group |
| Tailwind CSS | Utility-first CSS framework |
| WCAG 2.1 | Web Content Accessibility Guidelines |
| design-tokens/format | Design Tokens Format Module |
| Hermes Agent | Autonomous AI agent by Nous Research |
design tokens, design system, design.md, google design.md, design spec, design token validator, design token exporter, tailwind theme generator, dtcg exporter, w3c design tokens, css custom properties, wcag contrast checker, accessibility validator, ai agent design tokens, claude code design, gemini cli design, cline design system, aider design tokens, warp design, opencode design, goose design, openhands design, codex design system, visual identity spec, brand tokens, ui design tokens, component tokens, color palette, typography tokens, spacing tokens, dark mode design tokens, minimal design system, brutalist design tokens, neon design system, luxury brand tokens, saas design system, fintech design tokens, healthcare design system, ecommerce design tokens, gaming ui tokens, education design system, web3 design tokens, open source design tool, npm design tool, cli design tool, frontend design tokens