design-md/SKILL.md
# design-md Skill A skill for creating and managing DESIGN.md files — a format specification for describing visual identity to coding agents, developed by Google Labs. ## Overview DESIGN.md combines machine-readable design tokens (YAML front matter) with human-readable design rationale (markdown prose). Tokens give agents exact values; prose tells them *why* those values exist and how to apply them. ## File Structure A DESIGN.md has two layers: 1. **YAML front matter** — Machine-readable d
npx skillsauth add Heldinhow/awesome-opencode-dev-skills design-mdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A skill for creating and managing DESIGN.md files — a format specification for describing visual identity to coding agents, developed by Google Labs.
DESIGN.md combines machine-readable design tokens (YAML front matter) with human-readable design rationale (markdown prose). Tokens give agents exact values; prose tells them why those values exist and how to apply them.
A DESIGN.md has two layers:
--- fences at top## sectionsversion: "alpha" # optional, current: "alpha"
name: <string>
description: <string> # optional
colors:
<token-name>: "#<hex>" # sRGB hex color
typography:
<token-name>:
fontFamily: <string>
fontSize: <string> # e.g., "1rem", "24px"
fontWeight: <number>
lineHeight: <string>
letterSpacing: <string>
fontFeature: <string>
fontVariation: <string>
rounded:
<scale-level>: <Dimension> # e.g., "4px", "8px"
spacing:
<scale-level>: <Dimension | number>
components:
<component-name>:
backgroundColor: <Color | token ref>
textColor: <Color | token ref>
typography: <Typography token>
rounded: <Dimension | token ref>
padding: <Dimension>
size: <Dimension>
height: <Dimension>
width: <Dimension>
| Type | Format | Example |
|:-----|:-------|:--------|
| Color | # + hex | "#1A1C1E" |
| Dimension | number + unit | 48px, -0.02em |
| Token Reference | {path.to.token} | {colors.primary} |
| Typography | object | { fontFamily: "Public Sans", fontSize: "1rem" } |
Sections use ## headings and must appear in this order:
Export to other formats:
# Tailwind theme config
npx @google/design.md export --format tailwind DESIGN.md > tailwind.theme.json
# DTCG tokens.json (W3C format)
npx @google/design.md export --format dtcg DESIGN.md > tokens.json
Install:
npm install @google/design.md
lint — Validate DESIGN.mdnpx @google/design.md lint DESIGN.md
cat DESIGN.md | npx @google/design.md lint -
diff — Compare two versionsnpx @google/design.md diff DESIGN.md DESIGN-v2.md
spec — Output full specificationnpx @google/design.md spec
npx @google/design.md spec --rules
| Rule | Severity | What it checks |
|:-----|:---------|:---------------|
| broken-ref | error | Token references that don't resolve |
| missing-primary | warning | No primary color defined |
| contrast-ratio | warning | WCAG AA minimum (4.5:1) not met |
| orphaned-tokens | warning | Color tokens never referenced |
| token-summary | info | Token counts per section |
| missing-sections | info | Optional sections absent |
| missing-typography | warning | No typography tokens |
| section-order | warning | Sections out of canonical order |
---
name: Heritage
colors:
primary: "#1A1C1E"
secondary: "#6C7278"
tertiary: "#B8422E"
neutral: "#F7F5F2"
typography:
h1:
fontFamily: Public Sans
fontSize: 3rem
body-md:
fontFamily: Public Sans
fontSize: 1rem
label-caps:
fontFamily: Space Grotesk
fontSize: 0.75rem
rounded:
sm: 4px
md: 8px
spacing:
sm: 8px
md: 16px
---
## Overview
Architectural Minimalism meets Journalistic Gravitas. The UI evokes a
premium matte finish — a high-end broadsheet or contemporary gallery.
## Colors
The palette is rooted in high-contrast neutrals and a single accent color.
- **Primary (#1A1C1E):** Deep ink for headlines and core text.
- **Secondary (#6C7278):** Sophisticated slate for borders, captions, metadata.
- **Tertiary (#B8422E):** "Boston Clay" — the sole driver for interaction.
- **Neutral (#F7F5F2):** Warm limestone foundation, softer than pure white.
When a user asks you to design or build UI components:
DESIGN.md in the projectnpx @google/design.md lint DESIGN.mdimport { lint } from '@google/design.md/linter';
const report = lint(markdownString);
console.log(report.findings);
console.log(report.summary); // { errors, warnings, info }
console.log(report.designSystem); // Parsed DesignSystemState
npm install @google/design.mdtools
Implement WebSocket communication for real-time bidirectional client-server communication.
development
Implement webhook handlers for processing incoming events from external services.
development
Test web applications using Playwright for end-to-end browser testing.
development
Build production-quality HTML artifacts using React, Tailwind CSS, and shadcn/ui.