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.00924 |
| Opus 5.5 | $0.00006 | $0.00370 |
| Sonnet 5.5 | $0.00003 | $0.00185 |
| Haiku 4.5 | $0.00002 | $0.00092 |
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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 42 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. Run the packaged skills/diagram-design/scripts/export_svg.py and skills/diagram-design/scripts/export_png.py helpers for the requested formats. 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 flag (nothing, or only
--scale/--output) and no--registry: produce both.svgand.pngnext to the source (e.g.diagram.html→diagram.svg+diagram.png).--svg-onlyor--png-onlyrestricts the image output to that one format. - 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-onlyor--png-onlyexplicitly.
Flags
--svg-only— emit only the SVG. Skip Playwright entirely.--png-only— emit only the PNG.--scale=N— override the PNG device scale factor with a finite number from1to4, including fractional values such as1.25. 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-onlyor--png-onlyto also produce an image in the same call.
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.
- today Changed 1d099af9c859
- 4d ago Changed · +1 lines 18a711ebf8c9
- 10d ago Changed 162b2e982c80
- 13d ago Changed c18a938b5b8f
- 27d ago Changed 178d8a885dfe
- 1mo ago Changed · +4 lines 7395e3cb2277
- 1mo 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 (61,060 stars, last pushed today), licensed MIT. It adds 16 tokens to every session and 924 once invoked, about $0.0001 per session on Opus 5.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.
design-handoff
Write a design-to-engineering handoff as Markdown in the user's repository. Use when invoked as /document-design-system:design-handoff. Produce designed HTML or PDF only when asked.
arch4-open-map
Show this repository's rendered Arch4 architecture map widget.
ui-library
Goal: Create a world-class, enterprise-grade UI library for ObjectStack. Tech Stack: React, Tailwind CSS, Shadcn UI, Framer Motion.
ui-flow-review
Review menus, HUD, navigation, and player flow from a UX perspective.
setup
Check whether the local Pi CLI is ready, show available models, and optionally toggle the stop-time review gate.