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/import-drawio)<a href="https://agentmods.dev/commands/cathrynlavery/diagram-design/import-drawio"><img src="https://agentmods.dev/badge/commands/cathrynlavery/diagram-design/import-drawio/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/import-drawio"><img src="https://agentmods.dev/badge/commands/cathrynlavery/diagram-design/import-drawio.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.00020 | $0.00951 |
| Opus 5 | $0.00010 | $0.00476 |
| Sonnet 5 | $0.00004 | $0.00190 |
| Haiku 4.5 | $0.00002 | $0.00095 |
Grade A, and why
import-drawio 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 11d 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
2 near-identical copies found in the catalogue:
- import-drawio — 100% identical, 0 lines differ
- import-drawio — 94% identical, 4 lines differ
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Redraw the draw.io file at $1 as a diagram in this skill's design system, following skills/diagram-design/references/import-drawio.md and skills/diagram-design/references/output-spec.md. Treat those references as the source of truth — don't reimplement the logic here.
Full argument string: $ARGUMENTS
Accepts .drawio, .drawio.xml, .xml, .drawio.png, and .drawio.svg.
Defaults
--format=html— a self-contained HTML file next to the source.--size=doc-inline—viewBox 0 0 960 600.--detail=balanced·--audience=mixed.--variant=light— the minimal light template.- A single-page file selects its only page; a multi-page file lists pages and asks which to use.
- Type is chosen from the extracted structure;
--typeforces one of the visual types inSKILL.md§3.
Flags
--format—html(default),svg,png, orhtml+png. Non-HTML formats are produced from the HTML viareferences/export.md, never hand-authored.--size— any preset inoutput-spec.md§2:doc-inline,doc-wide,slide-16x9,slide-4x3,social-og,social-square,print-a4-landscape,print-letter-landscape,fit.--detail—faithful(≤24 nodes, zoned),balanced(≤12),simplified(≤7).--audience—engineer,mixed,executive. Governs wording, not element count.--type— force a diagram type instead of inferring it.--page— page index, page name, orall(one file per page).--variant—light,dark, orfulleditorial template.--output— output base path; the extension is appended per format.
Required behaviour
- No file provided → ask which
.drawiofile. Don't guess. - Always locate the installed skill and run
<skill-dir>/scripts/drawio_extract.pyfirst. Never assume the skill is under the current working directory, and never read a.drawiofile directly — most are compressed, and the raw XML is noise. - Extractor exits non-zero → report its message verbatim and stop.
- Digest shows 0 nodes → the source is image-only or encrypted. Say so; ask for the original file. Don't invent content.
- Multi-page file with no
--page→ list the pages with their node/edge counts and ask which one. - Requested detail level is impossible at the requested size (e.g.
faithfulon a 40-node source atslide-16x9) → say so before drawing and propose overview + per-zone detail. --detail=faithfulabove 9 nodes → zone the layout; above 24 nodes, split into overview + detail files.- Never carry over source coordinates, colors, or fonts. The output is a redraw in the project's
style-guide.mdskin. - Run the SKILL.md §9 taste gate and the
output-spec.md§6 checklist before writing.
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.
- 11d ago First seen · 52 lines · 20 tokens per session scan A 1ce7c65e84e4
import-drawio is a command published in the GitHub repository cathrynlavery/diagram-design (37,301 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 951 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.
arch4-open-map
Show this repository's rendered Arch4 architecture map widget.
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.
ppt-image2-editable-rebuild
Rebuild image2 or imagegen reference slides as editable PowerPoint decks.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
p3-ux-wireframes
Creates wireframes (ASCII art) for the most important screens with interaction descriptions.