Installation & CLI
DESIGN.md requires no runtime package in your application bundle. You store the file in git alongside your source code and use CLI or MCP tools to validate, diff, and fetch specs.
Repository layout
For single-app repositories, place DESIGN.md at the repository root:
my-app/
├── DESIGN.md
├── AGENTS.md
├── CLAUDE.md
└── src/For monorepos with multiple frontends, either keep a shared root DESIGN.md or place app-specific files next to each frontend package (apps/web/DESIGN.md, apps/docs/DESIGN.md) and point your agent rules at the package-local path.
Commit DESIGN.md to git so every branch and pull request carries the exact visual spec that matches its UI changes.
Official @google/design.md CLI
Google Labs publishes the format specification and reference CLI as @google/design.md on npm. It validates syntax, resolves {token} references, checks WCAG contrast ratios, and compares versions.
# Validate a DESIGN.md file
npx @google/design.md lint DESIGN.md
# Compare two revisions for token-level regressions
npx @google/design.md diff DESIGN.md DESIGN-v2.mdlintreports blocking errors (duplicate sections, broken{token}references, flat/grouped key collisions) and warnings (missing-primary,contrast-ratio,orphaned-tokens,section-order, and more).- Exit code is
1when errors are found. - Both
lintanddiffaccept a file path or-for stdin, and output JSON by default (--format json).
On Windows/PowerShell, use the dot-free designmd binary alias because .md in design.md collides with Windows Markdown file associations:
npx -p @google/design.md designmd lint DESIGN.mdRun in CI (GitHub Actions)
Add a lightweight workflow to catch broken token references or invalid YAML before merging PRs:
name: Validate DESIGN.md
on:
pull_request:
paths:
- "**/DESIGN.md"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: npx --yes @google/design.md lint DESIGN.mdFetching raw files via HTTP
Every website detail page in DesignMD Pro exposes a Markdown endpoint at /websites/<slug>.md (optional ?version=<ver>):
# Free websites return the full DESIGN.md source
curl -fsSL https://designmdpro.app/websites/linear.md -o DESIGN.md
# Fetch a specific historical revision
curl -fsSL "https://designmdpro.app/websites/linear.md?version=1.0.0" -o DESIGN.mdFor Pro websites, unauthenticated requests to /websites/<slug>.md return a public preview (narrative sections, primary color, fonts, palette preview, and typography preview) with an upgrade link. See REST API & Markdown for details.
Connecting the DesignMD Pro MCP server
Instead of copying files manually, coding agents can search the DesignMD Pro library and pull sections on demand over Streamable HTTP:
- Endpoint:
https://designmdpro.app/mcp - Authentication: Optional. Anonymous requests work read-only at the public tier (
30requests/minute per IP). A Pro API key (dmdp_…from Account → API Keys) unlocks full tokens, archived revisions, andextract-color-palette(60requests/minute per key).
Example registration in Claude Code (no key required to start):
claude mcp add --transport http designmdpro https://designmdpro.app/mcpWith a Pro API key:
claude mcp add --transport http designmdpro https://designmdpro.app/mcp \
--header "Authorization: Bearer dmdp_your_api_key"Never commit real dmdp_… keys to git — store them in environment variables or user-level client configs (~/.cursor/mcp.json, ~/.codeium/windsurf/mcp_config.json). Copy-paste snippets for all clients are on the MCP Server page, and full tool schemas are documented in the MCP Server Reference.
Next steps
- Frontmatter & Structure — author or customize your YAML frontmatter
- Validator & Lint Rules — compare the browser validator and CLI checks
- Claude Code Integration — wire
DESIGN.mdinto your agent workflow