/do-it:design runs instead · from do-it
Composes design system tokens (color, typography, spacing) as machine-consumed JSON artifacts for the build loop. Runs between PRD and first UI build.
This skill never runs in Claude Code
It ships in do-it at skills/, but /do-it:design (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Compose specifications, not pixels. Read the PRD (plus the codebase map on brownfield), emit the artifacts the build loop reads. No Figma, no mockups.
Once per project, between /do-it:prd and the first /do-it:build that touches UI.
Skip for pure backend / API / library / CLI work: "No UI in scope per the PRD — skipping /do-it:design. Go straight to /do-it:build."
--refresh re-runs after a substantial PRD change: diff existing files, preserve manual edits, surface conflicts.
Three machine-consumed artifacts, no narrative docs. They let F0 render a coherent base immediately; produce them before /do-it:build.
.do-it/design/tokens.jsonThe three sections are independent. Dispatch color, typography, and spacing as parallel subagents in one message. Then merge the returned JSON.
| Section | Keys | Rules |
|---|---|---|
color | brand.50…900, neutral.0…1000, semantic.{success,warning,danger,info}.{fg,bg}, surface.{background,card,subtle}, text.{primary,secondary,muted,inverse}, border.{default,muted,focus} | Check every text-on-surface pair against WCAG AA before you save. A darkMode variant at every key path is required. |
typography | family.{sans,serif,mono}, scale.{display,h1…h4,body-lg,body,small,caption}.{size,lineHeight,weight}, weight.{regular,medium,semibold,bold} | One modular ratio, documented in the file. |
spacing | spacing.{0,1,2,3,4,6,8,12,16,24}, radius.{none,sm,md,lg,full} | 4px base unit; no values off the scale. |
Canonical top-level shape — scripts/design-check.sh reads exactly this:
{ "color": { "brand": {"50": "#…", "…": "…", "900": "#…"}, "neutral": {"0": "#…", "…": "…", "1000": "#…"},
"semantic": {"success": {"fg": "#…", "bg": "#…"}, "warning": {…}, "danger": {…}, "info": {…}},
"surface": {"background": "#…", "card": "#…", "subtle": "#…"},
"text": {"primary": "#…", "secondary": "#…", "muted": "#…", "inverse": "#…"},
"border": {"default": "#…", "muted": "#…", "focus": "#…"} },
"typography": { "family": {…}, "scale": {…}, "weight": {…} },
"spacing": { "0": "0rem", "1": "0.25rem", "…": "…" },
"radius": { "none": "0", "sm": "0.25rem", "md": "0.5rem", "lg": "1rem", "full": "9999px" },
"darkMode": { "color": { …the same color subtree, re-picked… } } }
darkMode carries the color subtree only. Typography and spacing do not change between themes; requiring a dark variant of them would fail every valid file.
A gate protects the merged tokens before anything writes them. The command thread runs:
"${CLAUDE_PLUGIN_ROOT}/scripts/design-check.sh" <merged-tokens.json>
Exit 1: dispatch only the color subagent again, and paste in the failing pairs with their computed ratios. Two repair tries at most. On the second failure, report the script's raw output and stop. Never write a token file that fails its own gate.
.do-it/design/foundation.jsonDerive the smallest shared visual base from PRD §5 key screens. This is a build contract, not a component essay:
{
"foundation_version": 1,
"shell": {"regions": ["navigation", "main"], "responsive": "..."},
"primitives": [
{"name": "Button", "variants": ["primary", "secondary"], "states": ["default", "focus", "disabled", "loading"], "a11y": "button"}
]
}
Include only primitives F1/F2 visibly need: typography, layout/surface, actions, and relevant form/navigation/feedback controls. Reference token paths rather than duplicating values. Brownfield records existing primitives first and lists only genuine gaps. F0 ui-foundation tasks implement and gallery-test this file before F1 exists.
Only when _meta.json.platforms includes a typed-data platform (web, rn-expo, native-ios, native-android). One shared contracts.ts is a write-conflict between features building in parallel — see ${CLAUDE_PLUGIN_ROOT}/references/parallel-loop.md.
| App scaffolded? | Write to |
|---|---|
| Yes | <mock_data_dir>/contracts/<entity>.ts, plus <mock_data_dir>/contracts/index.ts — a barrel, one export * line per entity |
| Not yet | .do-it/design/data/contracts.ts — staging only. The first ui-types task splits it into the layout above. |
Entities come from the PRD's data model, or the features list if there is none. Each file carries the entity type, the hook result type, and the hook signature — the contract both fixtures.ts and api.ts satisfy (${CLAUDE_PLUGIN_ROOT}/references/adapter-pattern.md):
export type BoardGame = { id: string; title: string; /* … */ };
export type UseBoardGamesResult = { games: BoardGame[]; isLoading: boolean; error: Error | null };
export type UseBoardGames = () => UseBoardGamesResult;
Native iOS emits Swift protocols, native Android Kotlin interfaces — same shape, native idiom.
Report token summary, foundation primitives, and entity list. Write nothing else. Tell the user: "Foundation inputs ready. Next: /do-it:build. Run /do-it:design --full after the first domain screen renders."
--full — deferred polishRun after F1 renders, never before. First four land in .do-it/design/.
| Artifact | Content |
|---|---|
personas.md | 2-4 behavioral personas, exactly one PRIMARY. |
components.md | One spec for each component v1 needs · purpose · variants · states (default/hover/active/focus/disabled/loading/error) · tokens · anatomy · behavior · a11y (role, keyboard, SR) · screens. A later component arrives with a change proposal. |
audit.md | references/accessibility-audit.md, run for real. |
system.md | Human summary: intent, primary persona, voice, foundations, component index, a11y baseline, non-goals. |
docs/design-system/** | Mirror of the four above (system.md → overview.md) plus colors/typography/spacing from tokens.json. List in docs/index.md. |
Append one line to docs/log.md, shape per ${CLAUDE_PLUGIN_ROOT}/skills/llm-wiki/references/log-format.md:
## [{YYYY-MM-DD}] design | design system — {N} personas, {N} components, dark mode, WCAG AA {PASS|N fails}
scripts/design-check.sh computes them — never assert a ratio you did not run it for.--full) Every component variant traces to a persona's design implication.docs/ mirror on the default run. They unblock nothing.contracts.ts when features build in parallel.tokens.json before scripts/design-check.sh exits 0 on the merged object.foundation.json. That is a subagent writing .do-it/**, and the ban has no exception for speed.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
design-tokens, design-system, token-generation, wcag-contrast
npx claudepluginhub flyingwebie/skills --plugin do-it13 skills in this plugin
/build-loopExecute Do-it tasks. Reads .do-it/specs/ (current truth) and .do-it/changes/ (proposals), picks the next buildable band, builds under TDD discipline (software) or acceptance-driven (generic), respects the UI-first layer gate, and keeps the loop memo current. Product review runs per feature; optional knowledge maintenance never blocks code-first delivery. Triggered by /do-it:build or an autonomous loop each iteration.
/do-itRun the Do-it spec-driven MVP workflow in Codex. Use for PRD, brownfield mapping, config migration, grilling, design, preview, building, review, iteration, project status, retrospectives, or autonomous delivery./grillAdversarially challenge a spec-layer artifact — PRD, change proposal, or design system — before code exists. Hunts gaps, contradictions, ambiguity, scope creep. Triggered by /do-it:grill or "challenge the PRD", "poke holes".
Other plugins' skills for the same job