Validate, diff, and export DESIGN.md files for consistent design systems across projects.
DESIGN.md is a format specification (by Google Labs) for describing a visual identity to coding agents. It combines: - YAML front matter — Machine-readable design tokens - Markdown body — Human-readable design rationale
The skill uses @google/design.md npm package:
npm install -g @google/design.md
npx @google/design.md lint DESIGN.md
Checks:
- Token references resolve (broken-ref → error)
- WCAG contrast ratios (contrast-ratio → warning)
- Missing primary colors (missing-primary → warning)
- Section order (section-order → warning)
Output: JSON with findings
npx @google/design.md diff DESIGN.md DESIGN-v2.md
Detects: - Added/removed/modified tokens - Regressions between versions
npx @google/design.md export --format tailwind DESIGN.md > tailwind.theme.json
npx @google/design.md export --format dtcg DESIGN.md > tokens.json
npx @google/design.md spec
npx @google/design.md spec --rules
When working on UI components:
# Before editing a component, lint current state npx @google/design.md lint design-md/markiosi/DESIGN.md # After changes, diff to check for regressions npx @google/design.md diff design-md/markiosi/DESIGN.md design-md/markiosi/DESIGN.md.new # Export updated tokens npx @google/design.md export --format tailwind design-md/markiosi/DESIGN.md > tailwind.tokens.json小蔥技能7w4.net持續更新中。
Run lint to understand current design state
After UI changes:
diff to detect regressionsRun lint to validate WCAG compliance
For new components:
{colors.primary}) over hardcoded values這個Skill質量中規中矩,文件條理清楚,命令說明和示例都比較齊全,對基本使用場景覆蓋完整。但內容比較淺,主要是功能羅列,缺少實戰經驗和進階指導,新手可能會遇到問題時不知道如何排查。總體來說能用但不夠好用,適合有一定經驗的開發者參考。改進空間:需要補充更多實際應用案例和使用技巧。