Diagram Design
lastmod 2026-11-17created 2026-11-171 edits
Diagram Design is a diagramming skill for coding agents made by Cathryn Lavery. When you describe a diagram such as an architecture diagram, flowchart, or sequence diagram, the agent picks a suitable type and draws it as a single HTML file containing inline SVG. The skill spells out editorial design rules such as shadowless 1px lines, a 4px grid, and a single accent color, so the results differ from the rounded-box drawings models produce by default or the default Mermaid theme.
About
- Provides 50 diagram types (architecture, sequence, state machine, ER, swimlane, Gantt, Sankey, Wardley map, exploded axonometric, etc.), each in three variants: minimal light, minimal dark, and full-editorial. Opens directly in the browser with no build step, JavaScript, or external images
- Every node must have a reason to exist, and the accent color is used only on the one or two things to see first. Target density is 4/10. All coordinates sit on a 4px grid, and CI checks for overlaps and clipping
- Pointing it at a site, e.g.
onboard diagram-design tohttps://yoursite.com, extracts the background, body, and accent colors plus heading, body, and code fonts and turns them intostyle-guide.mdtokens. Checks WCAG AA contrast before applying and suggests adjustments if it falls short. The default palette is jet-black + tangerine - Brands can be saved as profiles; placing a
.diagram-designmarker file in a project lets each client use a different brand - Redraws existing draw.io, Mermaid, Excalidraw, and PlantUML (sequence and class only) files with the same content. You choose the format (html, svg, png), size (document, slide, social, print), level of detail (faithful up to 24 nodes, balanced 12, simplified 7), and audience (engineer, mixed, executive), and it leaves a list of merged or removed elements
-
/diagram-design:export-diagramexports SVG and PNG. PNG is rendered at 2x resolution with Playwright - Adds
role="img"and<title>/<desc>to the SVG. The only network request is Google Fonts; with system fonts it opens offline unchanged - Limitations stated in the README: the output is not an editable source format, so diffs can't be reviewed in PRs, and the same prompt may produce a different layout each time. Its position is that Mermaid is better for documents that change often in Git, while this skill is for figures to be published
- Installation:
npx skills add cathrynlavery/diagram-design. For Claude Code,/plugin marketplace add cathrynlavery/diagram-design, then/plugin install diagram-design@diagram-design. Works with Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, Pi, and others - MIT license