Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.
.design Skill
You are operating against a living visual contract. The .design file is data. This skill is the procedure: READ → FOLLOW → UPDATE → VERIFY.
Project .design always beats generic frontend/taste skills. User chat can override for the current task only.
When to activate
- Any UI generation, restyle, design review, or brand-consistency task
- A
.designor*.designfile exists in the repo - User asks to bootstrap, remix, sync, lock, unlock, or verify design
1. Discover
- From the edited path (or cwd), walk upward.
- Prefer
.design; else a single*.design; if multiple named files and no.design, ask. - Nearest file wins (monorepo package overrides root).
- Resolve
extendsdepth-first; child overrides parent; cycles = error — stop and report. - If no file exists and UI work is requested, offer bootstrap (do not invent an invisible system).
When bootstrapping or extracting, scan adjacent design signals before proposing anything: design notes in AGENTS.md / CLAUDE.md, an existing DESIGN.md, globals.css / theme files, Tailwind config, components.json, Storybook. Extract the full visual vocabulary — not just hex values: density, elevation language, hover/motion character, copy tone. Record what you scanned in sources.
Load order once found:
agent.instructionsoverview/intent/rationale.overviewconstraints(+rationale.dos/rationale.donts)policy/decisionstokens(includingelevation,motion, andsoundwhen present) +themes(active mode)voice(applies to all UI copy)rationale(colors, typography, layout, elevation, shapes, components)components/patterns(bind every property in each bag)integrations(e.g. shadcn)exampleslockedwhen updatingomitted(do not invent filler for listed sections)
2. Read
Treat tokens and structured rules as normative. Use intent.reference and overview for taste. Adjective-only intent without a specific reference is weak — prefer the reference sentence. When present, intent.direction is the committed aesthetic direction and intent.signature is where boldness concentrates — everything else stays quiet.
For large files, read in tiers (SPEC §8.1): the normative core (agent, intent, constraints, policy, decisions, tokens, components, locked, themes, voice) MUST load before UI work; long rationale.* sections MAY load on demand per task.
Self-contained: every valid file MUST include agent.instructions. If you were given only this file (drag-drop / @-mention) and the skill package is missing, obey agent.instructions in the file — it duplicates the essential READ → FOLLOW → UPDATE → VERIFY loop.
If agent.skill is design, you are on the correct procedure.
3. Follow (generate / edit UI)
First calibrate treatment for the surface: patterns.<name>.treatment > intent.treatment > request type (memo/dashboard/internal tool → utilitarian; landing/marketing/keepsake → editorial). Utilitarian surfaces get restrained product craft; only editorial surfaces run the distinctive-identity register.
Walk this loop every time:
Need UI change?
├── Match an existing components.* entry?
│ ├── Yes → walk decisions.<component> (first match wins)
│ │ bind tokens (never hardcode if token exists)
│ │ obey when / when_not
│ └── No → policy.if_missing
│ ├── ask → ask the user
│ ├── nearest → closest approved component + note
│ └── invent_with_note → invent once, then update .design catalog
├── Apply patterns.* if the surface matches
├── Enforce constraints.always / constraints.never
├── If integrations.shadcn.enabled:
│ prefer shadcn components (aliases.ui)
│ write css_vars (from map_from_tokens / literals) into integrations.shadcn.css
│ keep components.json style, aliases, cssVariables aligned
│ tokens.* win if they disagree with css_vars
└── Else: match the project's styling system (Tailwind, CSS, CSS-in-JS) —
apply .design VALUES into the existing stack; never impose a new stackPreserve policy.hierarchy when trading off (default: typography → spacing → contrast → color).
Then apply craft defaults from references/CRAFT.md wherever .design is silent (hierarchy, surfaces, motion, a11y, copy). `.design` wins on conflict. Apply voice to all UI copy with the same force as tokens.
Self-check before finishing (report inline):
- Every
constraints.neveritem absent;constraints.alwaysitems present - One primary emphasis per view; boldness only in the signature
- No raw hex/spacing/radius where a token exists
- Both theme modes legible (or
themes.singledeclared) - No catalogued default look (CRAFT "Default looks to avoid") claimed by accident
Then cite which tokens and components you used.
Detailed trees: references/APPLY.md. Craft: references/CRAFT.md. shadcn: docs/shadcn.md.
4. Update (design progress)
Edit the .design file in place. Git is the history — do not invent an in-file proposal queue.
| Situation | Action |
|---|---|
Path in locked | Ask the user before changing |
| Unlocked path + user asked to update | Edit file; bump version + updated_at |
| Bootstrap / extract | Plan → critique → confirm → write (below) |
| Sync from Claude Design / Stitch / Figma | Merge into file; ask before overwriting locked keys |
| Breaking change | Confirm with user; MAJOR SemVer bump |
Bootstrap / remix is a two-pass process. The .design file is the design plan:
- Plan — draft the token proposal: 4–6 named colors, 2+ type roles (characterful display used sparingly, complementary body, utility face), one-line layout intent, and the
intent.signature. - Critique — ask: would this plan be identical for any similar product? If yes, it is a default, not a decision — revise before writing. Check it against the CRAFT "Default looks to avoid" catalogue.
- Confirm — for restyles, show a small swatch sheet (palette + type roles, both modes) and get user confirmation before mutating the contract.
- Write — fill the file, set
status: bootstrap, populatesources; derive all subsequent UI only from the file.
SemVer: MAJOR = breaking visual/API; MINOR = additive; PATCH = fix/clarify.
Full rules: references/UPDATE.md and SPEC.md §18.
5. Verify (drift)
When asked to sync/verify, or after large UI refactors:
- Compare
tokensto CSS custom properties / Tailwind theme / token files - If
integrations.shadcn.enabled, comparecss_vars+radiustoglobals.cssandcomponents.json - Compare
componentsto real imports and variants - Flag hardcoded hex/spacing that should be tokens
- Report findings per token group as added / removed / modified, plus a regression flag when anything consumers may rely on was removed or changed (
scripts/diff_design.pyimplements this shape); update.designonly when asked
Checklist: references/REVIEW.md (includes CRAFT escalation triggers and Before/After/Why table).
6. Precedence conflicts
- Explicit user prompt (this task)
- Nearest
.design - This skill (procedure + CRAFT.md)
- Generic design/taste skills
- Model defaults
7. What not to do
- Do not invent a parallel design system when
.designexists - Do not hardcode colors/fonts/spacing when tokens exist
- Do not put full page HTML trees or binaries into
.design - Do not edit locked paths without asking
- Do not replace the project's styling toolchain
- Do not add
proposed_changesor in-file changelog blocks
8. Companion skills (route, don't duplicate)
.design is the contract; other skills are procedure and taste below it (precedence §6). When one of these is installed, hand the matching job to it and pass the contract along — never re-derive what it already knows, and never let its output redefine a token.
| Job | Hand to | The contract's role |
|---|---|---|
| UI code review, motion timing, sound design, AI-default-tell audit, "why does this feel flat" | AgentsORG design-engineering (skill graph + subagents; /design-engineering routes) | Its craft applies only where this file is silent; tokens.motion / tokens.sound win over its duration and level tables |
| A named polish pass — polish, critique, audit, typeset, layout, colorize, animate, distill, harden, onboard, clarify, adapt, optimize | impeccable (/impeccable <command>) | Point it at .design first; if it writes or updates a DESIGN.md, import per docs/design-md-mapping.md rather than keeping two sources |
| A launch video, logo reveal, or any rendered motion piece | HyperFrames (hyperframes-creative + hyperframes-audio) | Emit exports.frame_md from this file; HyperFrames reads frame.md ahead of design.md / DESIGN.md |
Generating the files assets.sounds points at | ElevenLabs sound-effects skill, or the design-engineering sound generator | tokens.sound.material is the prompt prefix; tokens.sound.duration / peak are the spec |
| Installing or theming components | shadcn CLI / MCP (info, search, view, add --dry-run, apply --preset, migrate) | integrations.shadcn drives it; tokens win over css_vars |
Detection: a skill is "installed" when its SKILL.md exists under the agent's skills directory (.agents/skills/, .claude/skills/, a plugin cache) or its slash command is registered. If none is installed, do the job with CRAFT.md and say which skill would have owned it.
Quick field map
See references/SPEC-SUMMARY.md.
