harvest

harvest is a command for Codex from OthmanAdi/MDDesign. It costs 52 tokens per session (499 once invoked), scanned A, original, Apache-2.0.

A command that scans an existing codebase and creates a DESIGN.md file describing its design tokens, such as colors, fonts, and spacing. It checks the file against Google's design.md format.

In plain words
What is it for?
Use it to create a starting design reference for a project, or to document the visual rules already present in its code.
Why use it?
It removes the need to document an existing interface style by hand and catches formatting problems through validation.

Command for Codex

Part of the mddesign plugin — 5 skills, 10 commands, 5 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/othmanadi/mddesign/harvest
Clone the repo
git clone --depth 1 https://github.com/OthmanAdi/MDDesign

Made for: Codex.

Or install mddesign, the plugin that ships this one along with the rest of its 5 skills, 10 commands, 5 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for harvest

README.md
[![agentmods](https://agentmods.dev/badge/commands/othmanadi/mddesign/harvest.svg)](https://agentmods.dev/commands/othmanadi/mddesign/harvest)
Your own site
<a href="https://agentmods.dev/commands/othmanadi/mddesign/harvest"><img src="https://agentmods.dev/badge/commands/othmanadi/mddesign/harvest.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 499 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.00499
Opus 5 $0.00026 $0.00249
Sonnet 5 $0.00010 $0.00100
Haiku 4.5 $0.00005 $0.00050

Measured 4d ago against content hash 554f12f63131, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

harvest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/commands/harvest.md · 42 lines

What it actually says

/mddesign:harvest

Generate DESIGN.md from an existing codebase.

What I do

  1. Pre-flight: glob DESIGN.md at project root.

    • If exists and --overwrite not passed: refuse. Point user at /mddesign:critique.
    • Confirm npx is available via bash -c "command -v npx".
  2. Dispatch design-archeologist: call the Agent tool with subagent_type: design-archeologist and a prompt that contains a PhaseSpec for harvest-<short-uuid> (see skills/design-harvest/SKILL.md for the exact PhaseSpec shape).

  3. HITL gate at write time: when the subagent returns draft_design_md, print it to the user and wait for the PreToolUse hook (named checkpoint: before_design_md_write) to approve the write.

  4. Write: Write the draft to DESIGN.md at project root.

  5. Lint and iterate:

    • Bash: npx --yes @google/design.md lint DESIGN.md
    • If exit 0, done.
    • If non-zero, capture output, re-dispatch design-archeologist with lint_errors: <output>. Loop up to 3 times.
    • After 3 failed iterations, print errors and stop.
  6. Append to progress.md: under ### Phase harvest-<uuid> Result, note token counts, lint status, and next step (/mddesign:critique).

Arguments

  • --overwrite — replace existing DESIGN.md. Requires explicit intent because this is a destructive-ish action.

Boundaries

  • Only writes DESIGN.md under the HITL gate.
  • Never edits task_plan.md.
  • Never reimplements Google's linter.

See skills/design-harvest/SKILL.md for full implementation details.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 42 lines · 52 tokens per session scan A 554f12f63131

Subscribe to this mod's changes

harvest is a command published in the GitHub repository OthmanAdi/MDDesign (13 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 499 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.