Diagram Design is a tool for creating editorial-style diagrams as self-contained HTML and SVG files, covering layouts such as flows, system architectures, Sankey diagrams, maps, and schemas. Designers and coding-agent users can use it to produce branded static diagrams or redraw Mermaid and draw.io sources. The catalogue commands, plugin, and skill provide the agent workflow for generating these diagrams.
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.
git clone --depth 1 https://github.com/cathrynlavery/diagram-designWrote 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.
[](https://agentmods.dev/commands/cathrynlavery/diagram-design/export-diagram)<a href="https://agentmods.dev/commands/cathrynlavery/diagram-design/export-diagram"><img src="https://agentmods.dev/badge/commands/cathrynlavery/diagram-design/export-diagram/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/cathrynlavery/diagram-design/export-diagram"><img src="https://agentmods.dev/badge/commands/cathrynlavery/diagram-design/export-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.00848 |
| Opus 5 | $0.00008 | $0.00424 |
| Sonnet 5 | $0.00003 | $0.00170 |
| Haiku 4.5 | $0.00002 | $0.00085 |
Grade A, and why
export-diagram 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 3d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- export-diagram — 100% identical, 11 lines differ
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Export the diagram HTML at $1 to .svg and/or .png, following the procedure documented in skills/diagram-design/references/export.md. Treat that reference as the source of truth — don't reimplement the logic here. If --registry is present, also follow skills/diagram-design/references/export-registry.md to emit the metadata sidecar — a separate procedure from the SVG/PNG rasterization above.
Full argument string: $ARGUMENTS
Defaults
- With no format flags, or with
--svg-only/--png-only/--scale/--outputbut no--registry: produce both.svgand.pngnext to the source (e.g.diagram.html→diagram.svg+diagram.png). - PNG renders at
device_scale_factor=2. --registrygiven by itself, with neither--svg-onlynor--png-onlyalso present, produces only the registry JSON. The SVG/PNG defaults above do not also apply, and Playwright is never required for a registry-only call. To get an image alongside the registry, add--svg-onlyand/or--png-onlyexplicitly.
Flags
--svg-only— emit only the SVG. Skip Playwright entirely.--png-only— emit only the PNG.--scale=1/--scale=2/--scale=3— override the PNG device scale factor. Default2.--output=<path>— override the output base path; the format extension is appended. Applies to both formats when both are produced.--registry— emit<basename>.registry.json, a metadata sidecar of every block'sdata-block-*attributes. Followsskills/diagram-design/references/export-registry.md, a procedure independent of the SVG/PNG rasterization above — it never needs Playwright. Used alone (see Defaults), it is the only output produced. Combine with--svg-onlyand/or--png-onlyto also produce an image in the same call.
Required behaviour
- No source path provided → ask the user which
.htmlfile to export. Don't guess. - Source is
assets/index.html(the gallery, multiple SVGs in one file) → refuse and ask which specific diagram file. Per the reference's edge-case section. - Source has no
<svg>block → refuse and tell the user; don't write anything. - PNG requested but Playwright not installed → surface the install instruction from the reference verbatim and stop. Do not auto-install.
- PNG requested with
--scaleoutside {1,2,3} → reject; valid values are 1, 2, 3. --registryrequested but source has nodata-block-idattributes → refuse and tell the user; don't emit an empty or partial registry file. Per the export-registry reference's edge-case section.--registryis the only flag given (no--svg-only/--png-only) → emit only the registry JSON. Do not also produce SVG/PNG, and do not check for Playwright — a registry-only call must succeed on a host that doesn't have it installed at all.
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.
- 3d ago Changed · +4 lines 7395e3cb2277
- 11d ago First seen · 37 lines · 16 tokens per session scan A 729584e6a347
export-diagram is a command published in the GitHub repository cathrynlavery/diagram-design (37,301 stars, last pushed today), licensed MIT. It adds 16 tokens to every session and 848 once invoked, about $0.0001 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.
Other commands, from other repositories
reimagine-it
Claude Code, Codex, Factory Droid, Cursor, Copilot, Gemini CLI. Redesign existing HTML from its own content — 15 visual directions (webpage, infographic, SVG, Three.js, simulation, and the rest). Invent a leap they did not know to ask for. Not a mood board. The CLI does not ingest PDF or PPTX.
video
Create a design based on video.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.