design-spec
O que ela faz
Esta skill explica como escrever um arquivo DESIGN.md, um guia único com as cores, a tipografia, os espaçamentos e os componentes de um projeto. É para designers e desenvolvedores que querem um visual consistente.
Quando usar
- ✓Quando você está começando um novo site ou app e quer definir o visual antes de criar as telas.
- ✓Quando um projeto precisa de um conjunto único de valores de design para cores, fontes e espaçamentos.
- ✓Quando você quer dar à IA um briefing visual claro para seguir.
Link da skill
https://github.com/vudovn/ag-kit/blob/main/.agents/skills/design-spec/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Escreva um DESIGN.md para o site da minha nova cafeteria, com regras de cores, fontes e espaçamentos, antes de criarmos qualquer página.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O arquivo tem, no topo, um bloco de valores de design que uma máquina consegue ler, seguido de notas escritas que explicam as escolhas. A IA usa esse arquivo como fonte de verdade ao montar a interface.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
DESIGN.md Specification
A DESIGN.md is the single source of truth for a project's visual language. Create it BEFORE building UI. Two layers: machine-readable design tokens (YAML front matter) + human-readable rationale (markdown body). Tokens are normative; prose gives context. Prose may use descriptive names ("Midnight Forest Green") that map to systematic token names (
primary).Format adapted from the DESIGN.md spec (Google Labs, Apache-2.0). A linter/exporter exists:
npx @google/design.md.📚 Reference library: collection.md — 70+ real-world DESIGN.md files (Airbnb, Stripe, Linear, Vercel, Apple…) to study or adapt as a starting point.
When to produce a DESIGN.md
This is a hard gate for UI work (see .agents/rules/design-rules.md): before writing components, pages, or styles, a DESIGN.md must exist at the project root. If absent, create it first from the brief; if present, read it and conform.
The token block converts cleanly to/from tokens.json, Figma variables, and Tailwind theme config — so it is the bridge between design intent and code.
1. File structure
---
<YAML token front matter>
---
# Project Name (optional title)
## Overview
## Colors
## Typography
## Layout
## Elevation & Depth
## Shapes
## Components
## Do's and Don'ts
Front matter MUST begin and end with a line containing exactly ---. Sections use ## headings, appear in the order above, and may be omitted if irrelevant. Domain-specific sections may be added.
2. Token schema (YAML front matter)
version: alpha # optional
name: Daylight Prestige
description: ... # optional
colors:
<token-name>: "#RRGGBB"
typography:
<token-name>:
fontFamily: Public Sans
fontSize: 48px
fontWeight: 600
lineHeight: 1.1
letterSpacing: -0.02em
rounded:
<scale>: 8px
spacing:
<scale>: 16px # Dimension or unitless number
components:
<component-name>:
backgroundColor: "{colors.primary}"
rounded: "{rounded.md}"
padding: 12px
<scale> is a named level: xs sm md lg xl full (any descriptive key is valid).
3. Type system
| Type | Format | Example |
|---|---|---|
| Color | # + hex (sRGB) |
"#1A1C1E" |
| Dimension | number + unit (px/em/rem) |
48px, -0.02em |
| Token Reference | {path.to.token} |
{colors.primary} |
| Typography | composite object | see §4 |
Typography properties: fontFamily (string), fontSize (Dimension), fontWeight (number — bare or quoted are equivalent in YAML), lineHeight (Dimension or unitless multiplier — unitless recommended), letterSpacing (Dimension), fontFeature (string), fontVariation (string).
Token references: wrapped in {} pointing to another value in the tree. Most groups must reference a primitive ({colors.primary-60}), not a group. Inside components, references to composite values are allowed ({typography.label-md}).
Component property tokens: backgroundColor, textColor (Color); typography (Typography); rounded, padding, size, height, width (Dimension).
Variants: define UI states as separate entries with a related key — button-primary, button-primary-hover.
4. Sections (canonical order)
| # | Section | Aliases | Purpose |
|---|---|---|---|
| 1 | Overview | Brand & Style | Brand personality, audience, emotional tone. Fallback context when a token isn't defined. |
| 2 | Colors | Palettes; at least primary. Common: primary/secondary/tertiary/neutral. |
|
| 3 | Typography | 9–15 levels, each a semantic role (headline/body/label) × size. | |
| 4 | Layout | Layout & Spacing | Grid model, spacing scale, containment. |
| 5 | Elevation & Depth | Elevation | Shadows, OR for flat designs the alternative (borders, tonal layers, contrast). |
| 6 | Shapes | Corner radii, edge treatment, shape language. | |
| 7 | Components | Per-atom guidance: Buttons, Inputs, Cards, Chips, Lists, etc. | |
| 8 | Do's and Don'ts | Guardrails during generation. |
5. Recommended token names (guidance, not required)
- Colors:
primary secondary tertiary neutral surface on-surface error - Typography:
headline-display headline-lg headline-md body-lg body-md body-sm label-lg label-md label-sm - Rounded:
none sm md lg xl full
6. Consumer behavior for unknown content
The
Perguntas frequentes
O que vai em um arquivo DESIGN.md?
Ele guarda tokens de design, como cores, tipografia, espaçamentos e cantos arredondados, além dos motivos escritos para essas escolhas.
Posso começar a partir de um exemplo?
Sim. A skill indica uma coleção de arquivos DESIGN.md reais que você pode estudar ou adaptar.
Ele é necessário antes de construir uma interface?
A skill trata o arquivo como uma etapa obrigatória, então um DESIGN.md deve existir antes de componentes ou páginas serem escritos.
Detalhes
Descrição original do autor
How to author a DESIGN.md file — the machine-readable design-token + human-rationale format that must exist before any UI is built. YAML front-matter token schema (colors, typography, spacing, rounded, components), type system, token references, and canonical section order.
repo: vudovn/ag-kit
Popularidade
- Estrelas no GitHub
- 8,2 mil
- Posição no ranking
- #12531
- Licença
- MIT
- Atualizada em
- 18/10/2026
Comentários
- …
Mais skills deste repositório
batch-operations
8,2 milAjuda seu agente a fazer a mesma mudança em muitos arquivos de uma vez, como renomear uma função ou substituir uma importação antiga em todos os lugares.
brainstorming
8,2 milEnsina seu agente a fazer perguntas de esclarecimento antes de construir algo novo ou complexo, para entender primeiro o seu objetivo.
code-review-checklist
8,2 milDá ao seu agente uma lista de verificação para revisar código quanto a corretude, segurança, desempenho, testes e documentação, incluindo riscos específicos de IA.
code-review-graph
8,2 milAjuda seu agente a revisar código em projetos grandes usando um mapa estrutural, para que ele leia apenas os arquivos afetados por uma mudança.
Skills parecidas
canvas
394 milPermite que seu agente mostre um widget visual hospedado em um painel conectado a um Mac e depois oculte o painel ou o mova para outra página.
control-ui
394 milAjuda seu agente a organizar e diagnosticar a Control UI do OpenClaw, incluindo sessões, painéis e Gateways conectados.
diagram-maker
394 milAjuda seu agente a criar diagramas claros em SVG, HTML ou Excalidraw editável, para processos, arquitetura de sistemas e esboços de quadro branco.