/mddesign:design-harvestfrom mddesign
Harvests a DESIGN.md from an existing codebase, critiques it against actual code, and applies safe quick-win fixes. Three modes: harvest, critique, fix.
Ships in mddesign. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The on-ramp. Three modes.
/mddesign:harvest)Goal: produce a structurally valid DESIGN.md at project root from the existing codebase.
DESIGN.md at project root.--overwrite, refuse: print "DESIGN.md already exists. Use /mddesign:critique instead, or pass --overwrite to replace."npx is available (bash -c "command -v npx").Call the Agent tool with subagent_type: design-archeologist and a prompt containing this PhaseSpec:
phase_id: harvest-<short-uuid>
parent_plan_ref: ./task_plan.md
goal: Extract de-facto design tokens from this codebase and return a draft DESIGN.md body following the Google Labs spec.
done_when:
- draft_design_md is non-empty
- draft_design_md contains YAML frontmatter and 8 ordered markdown sections
- draft_design_md includes a section #9 "Agent Prompt Guide"
inputs:
files: [] # the subagent globs the project itself
tools_allowed: ["Read", "Glob", "Grep", "Bash"]
tools_denied: ["Write", "Edit", "WebFetch"]
budget:
max_tool_calls: 200
max_wall_seconds: 600
hitl_checkpoints:
- before_returning_draft
return_contract:
format: markdown+frontmatter
fields: [summary, draft_design_md, open_questions]
The subagent has its own dedicated SKILL/agent definition at agents/design-archeologist.md.
draft_design_md field from the subagent's return.Write it to <project_root>/DESIGN.md. This write goes through the PreToolUse HITL gate (named checkpoint: before_design_md_write).Run:
npx --yes @google/design.md lint DESIGN.md
If exit code is 0, you are done.
If non-zero, capture the linter output. Re-dispatch design-archeologist with an additional input field lint_errors: <output> and instruction "fix every reported error and return a new draft." Loop up to 3 times. After 3 failed iterations, surface the final lint errors to the user and stop.
Append under ### Phase harvest-<short-uuid> Result:
/mddesign:critique./mddesign:critique)Goal: write DESIGN.md.critique.md adjacent to DESIGN.md with five audit passes.
DESIGN.md exists. If not, refuse with "No DESIGN.md found. Run /mddesign:harvest first."npx --yes @google/design.md lint DESIGN.md --json
Capture findings. Severity comes from the linter.
DESIGN.md and parse the YAML frontmatter token table.**/*.{tsx,jsx,vue,svelte,html,css,scss} plus tailwind.config.*).*background* and one is a *text* token, compute WCAG AA contrast. Flag below 4.5:1 (normal text) or 3:1 (large text).colors.focus-ring exists. If not, finding: "Missing focus-ring token; users tabbing through cannot see focus."prefers-reduced-motion fallback section is present in DESIGN.md. If not, finding.hover, active, focus, disabled, and error variants are defined. Flag missing variants.colors-dark.* block or @media (prefers-color-scheme: dark) overrides).Write DESIGN.md.critique.md at project root, adjacent to DESIGN.md. Format:
# DESIGN.md Critique
> Generated by MDDesign on <ISO timestamp>. Five audit passes.
## Summary
<N findings: P0 P1 P2 P3 counts>
## Findings
### F1 [P0 / structural / google-lint] Missing primary color
DESIGN.md has no `colors.primary` token. Required by Google linter rule 2.
Fix: declare `colors.primary` in the YAML frontmatter.
`/mddesign:fix F1`
### F2 [P1 / drift / leak] Hex color #FF6B6B used 14 times in code, not declared
Locations: src/components/Alert.tsx:23, src/components/Toast.tsx:11, ...
Fix: add `colors.danger = #FF6B6B` to DESIGN.md and replace literal usage.
`/mddesign:fix F2`
<...>
Each finding has a stable F<N> id, a severity (P0 P1 P2 P3), a category, a one-line description, evidence, a proposed fix, and the /mddesign:fix <id> slash command.
Append a one-line summary and a pointer to the critique file.
/mddesign:fix <finding-id>)Goal: apply ONE finding's fix from the critique.
DESIGN.md.critique.md, find the finding by id.applied, refuse.before_design_md_fix) and require approval.DESIGN.md (or, when the fix touches code, the named source file).npx --yes @google/design.md lint DESIGN.md. If lint regresses, revert the edit and surface the error.status: applied in DESIGN.md.critique.md.progress.md: "Applied F. DESIGN.md still passes lint."DESIGN.md outside /mddesign:harvest and /mddesign:fix.DESIGN.md at project root, not anywhere else.npx @google/design.md lint does.task_plan.md. Append to progress.md only.@google/design.md (npm, Apache 2.0). Use npx --yes @google/design.md .... No global install required at consume time.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (othmanadi/mddesign) — no native marketplace selected
npx claudepluginhub p/othmanadi-mddesign5 skills in this plugin
/design-bridgeContinuously bridges DESIGN.md into the active planning phase. When the user is working on a UI phase, reads the project's DESIGN.md, extracts the relevant token slice, and appends it to findings.md under "## Design Context" so the agent sees design constraints in its attention window. Never edits DESIGN.md, never edits task_plan.md. Idles when DESIGN.md is absent./memory-layerThree-tier memory layer for the orchestrator. Routes scratch (file-tier), WHERE (QMD), and WHY (MemPalace) through the existing code-memory-router slash command. Never edits planning files directly. Every WHY-tier promotion goes through the HITL gate./session-handoffMakes sessions durable across `/clear`, machine reboots, and IDE switches. SessionStart catchup pulls scratch + last MemPalace recall + planning files into context. Stop promotion writes a handoff note and runs memory-keeper. Manual `/mddesign:handoff` re-runs either at any time./team-dispatchTurns a plan phase into a PhaseSpec v1 and dispatches it to a specialist subagent via the Agent tool. Subagent reads files itself, returns a structured result, the result is logged into progress.md. Markdown is the shared state; no in-memory shared store across agents.Other plugins' skills for the same job