diagram-design: Branded, Self-Contained Diagrams From an Agent Skill
diagram-design is an MIT-licensed agent skill that turns a plain-language description into a branded HTML and SVG diagram. This guide covers installation across hosts, brand onboarding from a website URL, import and export formats, the 54 diagram types, the design rules, and the limits of a non-editable output file.
View 1 referenceAllow the functional cookie to save your likes. Privacy details
diagram-design is an MIT-licensed agent skill maintained by Cathryn Lavery that turns a plain-language description into a branded HTML and SVG diagram. It is a set of instructions and templates rather than a drawing model, and it runs inside coding agents such as Claude Code, Codex, and Cursor. Official repository
What is diagram-design?
diagram-design is an agent skill that draws diagrams as one self-contained HTML plus SVG file, styled to your brand. The README describes 54 diagram types with no shadows and no generic "Mermaid slop". It is maintained by Cathryn Lavery's company LittleMight, published under MIT, and official builds come only from the cathrynlavery/diagram-design repository.
How do you install diagram-design?
Install with npx skills add cathrynlavery/diagram-design; Claude Code and Codex also offer plugin-marketplace commands. The skill works in Cursor, Claude Code, Codex, Qoder, GitHub Copilot, Gemini CLI, Cline, Windsurf, Amp, and a few other hosts. The README lists a separate build script for Claude Desktop because its ZIP upload rejects more than 200 files.
npx skills add cathrynlavery/diagram-design
/plugin marketplace add cathrynlavery/diagram-design
/plugin install diagram-design@diagram-design
Claude Code disables third-party marketplace auto-update by default, so enable it in the plugin menu if you want automatic updates.
How do you onboard your brand into diagram-design?
Onboarding asks the agent to fetch your homepage and extract the dominant palette and font stack. Detected values map to semantic roles: paper, ink, muted, accent, and link. The agent shows a proposed diff and writes tokens to references/style-guide.md before you confirm and apply them.
| Website source | Token role |
|---|---|
| Body background | paper |
| Main text colour | ink |
| Caption or secondary text | muted |
| Most used brand colour | accent |
h1 font |
title font |
code font |
sublabel font |
The README checks WCAG AA contrast at 4.5:1 for text roles and 3:1 for essential marks. Default fonts load from Google Fonts; choosing system fonts makes the file fully offline.
What can diagram-design import and export?
Import supports draw.io files (.drawio, .drawio.xml, embedded-PNG or SVG variants), Mermaid (.mmd, .mermaid, fenced blocks), Excalidraw scene files, and PlantUML for sequence and class diagrams only. Parsing is text-only: no rendering, browser, or network access. Export options are HTML, SVG, PNG, and HTML plus PNG; SVG and PNG are written beside the source HTML file.
Excalidraw PNG and SVG exports are not accepted, and SVG or PNG export covers the diagram only, not the full editorial card layout.
How many diagram types does diagram-design support?
The current README lists 54 diagram types, each in three static variants: minimal light, minimal dark, and full-editorial. Earlier coverage quoted 39, 44, or 45 types, which reflects older releases. Always check the README in the repository you installed; the plugin manifest version and type count change frequently.
What design rules does diagram-design enforce?
The core rules are one accent colour for the one or two things that matter, 1px hairlines, no shadows, and every coordinate on a 4px grid. The stated target density is 4/10, and the highest-quality move is usually deletion. Templates include role="img", aria-labelledby, and first-child title and description elements for accessibility.
CI checks overlaps and clipping, and IDs are prefixed per diagram and variant to avoid collisions when several SVGs share a page.
What does a diagram-design prompt look like?
You describe the content and the relationship you want shown, not the pixels. A useful prompt names the diagram type, the audience, and the decision the picture should support. The agent then picks a type from its catalogue, applies the tokens from style-guide.md, and writes one HTML file.
Draw an architecture diagram of my app: browser, API gateway,
queue, worker, and Postgres. Show the request path from browser
to worker and the async write to the database. Use my brand
tokens and keep it to one accent colour.
Good prompts answer one question per diagram. An architecture diagram, a sequence diagram, and a timeline express different relationships; stacking them into one picture usually makes all three harder to read. Split dense material into an overview plus detail diagrams, and reserve the accent for the one or two nodes the reader must notice first.
What are the limitations of diagram-design?
The README states the downsides plainly: output quality depends on the model you use, and the same prompt can lay out differently twice. The result is not an editable source format — no text to diff and no canvas to drag a box on. For documentation that changes every sprint, Mermaid is still the better fit.
This guide reflects the repository README checked on December 2, 2026.
diagram-design FAQ
Can a human edit the diagram afterwards?
Only by editing the generated HTML or SVG source, which is text but not a convenient drag-and-drop editor. If a designer needs to keep adjusting node positions in a canvas tool, generate the diagram once as a starting point and move the work to Figma or draw.io. The exported SVG can also be opened in Illustrator for a final pass.
Does diagram-design replace Mermaid?
No. Mermaid stays readable in version control and regenerates from text, which suits living documentation. diagram-design targets a diagram you are about to publish, where brand consistency and visual quality matter more than diffability. Many teams use both for different documents.