/diagram-design:import-mermaid <mermaid-file> [--format=html|svg|png|html+png] [--size=<preset>] [--detail=faithful|balanced|simplified] [--audience=engineer|mixed|executive] [--type=<diagram-type>] [--diagram=N|all] [--variant=light|dark|full] [--output=<path>]from diagram-design
Redraws Mermaid diagrams as editorial-quality diagrams with configurable format, size, detail, audience, and visual variant. Also supports multi-block Markdown files.
Ships in diagram-design. Installing the plugin adds it to Claude Code.
Redraw the Mermaid source at $1 in this skill's design system, following skills/diagram-design/references/import-mermaid.md and skills/diagram-design/references/output-spec.md. Treat those references as the source of truth.
Full argument string: $ARGUMENTS
Accepts .mmd, .mermaid, and Markdown files containing fenced mermaid blocks.
--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.--type forces one of the visual
types in SKILL.md §3.--format — html (default), svg, png, or html+png. Non-HTML formats are produced from HTML through references/export.md.--size — any preset in output-spec.md §2: doc-inline, doc-wide, slide-16x9, slide-4x3, social-og, social-square, print-a4-landscape, print-a3-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.--diagram — diagram index or all (one file per block). Only selected blocks are parsed: the header gives their kind and node/edge counts and lists every other block as [N] not selected. Rerun with another index to inspect that block. all fails if any block fails.--variant — light, dark, or full editorial template.--output — output base path; the extension is appended per format.<skill-dir>/scripts/mermaid_extract.py first. Never assume the skill is under the current working directory.--diagram → report diagram 0's kind and node/edge counts plus the [N] not selected entries. If the user wants another block, ask for its index and rerun with --diagram N to inspect it.--detail=faithful above 9 nodes → zone the layout; above 24 nodes, split into overview + detail files.style-guide.md skin.output-spec.md §6 checklist before writing.quadrantChart redraws as Quadrant (type-quadrant.md). Keep the extractor's original axis strings; shorten to one word per tip when drawing. Nudge a point at exactly 0.5 off the axis by 0.04 and ledger it. Do not invent a focal from discarded source styling.Supported Mermaid grammars: flowchart, sequenceDiagram, stateDiagram-v2, erDiagram, quadrantChart.
After writing, report paths, sizes, the four dials, and the fidelity ledger (what was merged, collapsed, or dropped).
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub cathrynlavery/diagram-design --plugin diagram-design2 plugins ship this exact command · first indexed Nov 26, 2026
7 commands in this plugin
/doctorRequired behaviorRun one-shot environment diagnostics for Diagram Design readiness/export-diagramDefaultsExport a diagram-design HTML file to .svg, .png, and optionally .pdf next to the source/import-drawioDefaultsRedraw a draw.io file as an editorial diagram at a chosen format, size, and detail levelOther plugins' commands for the same job