AI coding agents can write your code, run your tests and fix your bugs — but ask one for a diagram and you usually get a generic rounded-box mess that looks nothing like the rest of your site. Diagram Design is a free, open-source agent skill that fixes exactly that: it teaches your AI agent to draw diagrams with real editorial taste — 54 diagram types in one consistent style, matched to your brand, as a single self-contained HTML file you can open with a double-click.
It is one of the fastest-growing design tools on GitHub, with more than 79,000 stars, and it works inside the AI tools you already use — Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, Pi and more.
What Is Diagram Design?
Diagram Design is an agent skill by Cathryn Lavery, built because she wanted diagrams she actually liked for her own blog posts. Every time she needed an architecture sketch, a flowchart or a pyramid, her AI agent returned the same generic boxes — so she wrote the taste down: one accent colour for the one or two things that matter, 1px hairlines, no shadows, and every coordinate placed on a 4px grid. The result is a design system your agent follows, not a drawing tool you have to learn.
Instead of dragging shapes by hand in Figma or writing Mermaid text and hoping the layout looks good, you describe the diagram in plain words — "Make me an architecture diagram of my app: frontend, backend, database, Redis cache" — and the agent picks the right type, states its plan, and writes one .html file with inline SVG. There is no build step, no JavaScript and no external image dependency: open the file in any browser and the diagram is there.
Key Features
- 54 diagram types in one style: architecture, flowcharts, sequence diagrams, state machines, ER/data models, timelines, swimlanes, quadrants, radar charts, Gantt charts, Sankey diagrams, Wardley maps, Kanban boards, user journeys, deployment maps, UML class diagrams, heatmaps, Git graphs and more — each in three variants: minimal light, minimal dark and full-editorial.
- Your brand, not a template: a 60-second onboarding pulls your website's palette and fonts and applies them across every diagram. Out of the box it renders in a jet-black and tangerine palette; saved brand profiles in
~/.diagram-design/profiles/survive updates and can be shared across client projects. - Import and redraw: point it at an existing draw.io, Mermaid, Excalidraw or PlantUML file and it redraws the same content in the editorial style, with four dials — format, size, detail and audience — plus a fidelity ledger that lists exactly what got merged, collapsed or dropped.
- Export to PNG and SVG: the
/export-diagramcommand exports the diagram as a standalone SVG for Figma and Illustrator, or a PNG at 2x for slides and social cards. - CI checks for committed diagrams: a reusable GitHub Action runs the skill's own geometry checks on every push and pull request, and fails the run when a label overflows its box — with an annotation saying what to move, and by how many pixels.
- Accessible by default: every diagram carries an accessible name and description, and brand colours are verified against WCAG AA contrast before they are applied. An MCP server is included so MCP-speaking apps can check and export diagrams too.
How It Works
The skill is a set of instructions and references your agent reads — a style guide, a type guide for each of the 54 diagram types, and rules for layout, contrast and accessibility. When you ask for a diagram, the agent first chooses the type that fits your message (a sequence for messages over time, a quadrant for impact versus effort), then lays every element out on a 4px grid, checking for overlaps and clipping as it goes. Because the output is one self-contained HTML file with inline SVG, you can publish it in a blog post, embed it in docs, or export it to PNG or SVG for a slide deck.
Browse the live gallery at cathrynlavery.github.io/diagram-design to flip through all 54 types with light, dark and full-editorial tabs before you install anything.
How to Install Diagram Design
Option 1 — any Agent Skills host (Cursor, Codex, Gemini CLI, Cline, Windsurf, Amp and more):
npx skills add cathrynlavery/diagram-design
Option 2 — Claude Code (recommended, auto-updates and slash commands):
/plugin marketplace add cathrynlavery/diagram-design /plugin install diagram-design@diagram-design
Option 3 — Pi:
pi install https://github.com/cathrynlavery/diagram-design
Then just ask in plain words: "Draw an architecture diagram for this system", "I need a quadrant showing Q2 projects by impact vs effort", or "Give me a sequence of a bearer token flow with refresh on 401". To match your brand, ask: "Onboard diagram-design to https://yoursite.com". To export, use /export-diagram path/to/diagram.html, or simply say "Export this diagram as SVG and PNG".
System Requirements
- An AI agent that supports the Agent Skills standard — Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, Pi, Kiro, OpenCode or a similar host. Node.js is needed for the
npx skillsinstall path. - Diagrams themselves need nothing: the output is a single HTML file with inline SVG, so any modern browser opens it. By default it loads fonts from Google Fonts, with a system-fonts option for fully offline use.
- PNG export needs Playwright (
pip install playwright && playwright install chromium). The CI check action and the MCP server need Python 3.9 or later.
Honest Notes and Limitations
Diagram Design is excellent at what it is for, but go in with open eyes. First, there are no releases published yet — you install from the main branch, so pin a commit if you want updates to reach you only after you review them. Second, output quality depends on the model behind your agent, and the same prompt can lay out differently twice. Third, the result is not an editable source format: there is no text to diff in a pull request and no canvas to drag a box on, so for documentation that lives in Git and changes every sprint, Mermaid is still the better fit — the README says this itself. Diagram Design is for the diagram you are going to publish. Finally, Claude Desktop rejects skill ZIPs with more than 200 files, so that host needs a small build script (python3 scripts/build-claude-skill-zip.py) included in the repo.
That said, if your blog posts, docs or decks currently ship with diagrams you are slightly embarrassed by, this is one of the most useful free tools on GitHub right now — install it once, and every diagram after that looks like it came from a designer.
Download Diagram Design Free
⬇ DOWNLOAD DIAGRAM DESIGN FREE
Direct download link: https://github.com/cathrynlavery/diagram-design/archive/refs/heads/main.zip
GitHub repository: https://github.com/cathrynlavery/diagram-design



Post a Comment