30 sec3 min coredeep dive optional
Diagram Design is a Claude Code plugin that generates 39 editorial-grade diagram types as self-contained HTML and SVG, matches your site’s brand in about 60 seconds, and redraws existing Mermaid or draw.io sources.
- 28,655 stars on GitHub, MIT licensed, written in plain HTML, actively updated.
- Every type ships in three static variants: minimal light, minimal dark, and full editorial, with no build step and no JavaScript.
- Install in one line for Claude Code, Codex, Factory Droid, or Pi, then ask for a diagram in natural language.
- Semantic patterns describe behavior separately from layout, so new needs reuse existing types instead of multiplying them.
Most AI generated diagrams look like they came from a template warehouse: generic rounded boxes, default shadows, and a color palette nobody chose. Diagram Design, first spotted via the cathrynlavery/diagram-design repository, is a skill for AI coding agents that takes the opposite approach. It generates editorial diagrams, the kind a design-minded publication would run, as static HTML plus inline SVG that you can commit, diff, and version like any other source file.
- 28,655 stars
- 1,819 forks
- HTML
- MIT
What Diagram Design actually is
Diagram Design is a plugin and skill for Claude Code, Codex, Factory Droid, and Pi. You describe the diagram you need in plain language, and the skill produces one of 39 visual types as a single self-contained HTML file with inline SVG. There is no build step, no JavaScript runtime requirement, and no external image dependency, so the output opens directly in a browser and survives being checked into a repository. Each type ships in three static variants: minimal light, minimal dark, and full editorial.
The skill also profiles your brand. Point it at your website and it reads the palette and typography, which is how it claims a brand match in about 60 seconds. Version 2.5 added semantic system patterns and optional accessible motion, while static output remains the default, and the 2.5.10 release folded in ten more layout grammars. If you already have diagrams trapped in Mermaid or draw.io form, the skill redraws those sources at a chosen format, size, and detail level.
Why AI coding agents keep breaking diagrams
The author, Cathryn Lavery, who writes at littlemight.com and runs BestSelf.co, built the skill after asking Claude for architecture sketches and flowcharts and getting back generic rounded box output that matched nothing else on her sites. The usual alternatives each fail differently: Mermaid gives you structural correctness with dated default styling, Figma gives you styling with a half hour of manual layout, and hand written SVG gives you both at the cost of an afternoon.
An agent with a good diagram skill collapses that tradeoff. Because the output is a single static file, the diagram participates in the same review workflow as code: it can live next to the component it documents, get reviewed in a pull request, and be regenerated when the system changes. That last property is the one teams underestimate. A diagram that is cheap to regenerate stays true; a diagram that takes 30 minutes to update silently rots.
| Layout grammar (2.5.10) | Best for |
|---|---|
| Sankey | Flow between stages with quantities |
| Fishbone | Cause and effect breakdowns |
| Wardley map | Strategy and component evolution |
| Kanban | Process stages and work in flight |
| User journey | Experience phases and touchpoints |
| Deployment | Infrastructure and environments |
| Dependency graph | Services, packages, modules |
| UML class | Domain models and relationships |
| Story map | Releases across user activities |
| Database schema | Tables, keys, and relations |
Install it in your agent of choice
Installation is one command per client. Claude Code treats Diagram Design as a plugin from its own marketplace; Codex, Factory Droid, and Pi each have a native equivalent. After installing in Claude Code, enable auto update once from the plugin marketplaces panel, since Claude Code disables it by default for third party marketplaces.
/plugin install diagram-design@diagram-designcodex plugin marketplace add cathrynlavery/diagram-design
codex plugin add diagram-design@diagram-designdroid plugin marketplace add https://github.com/cathrynlavery/diagram-design
droid plugin install diagram-design@diagram-design --scope userpi install https://github.com/cathrynlavery/diagram-designPi loads the skill for matching requests and exposes it explicitly as /skill:diagram-design, along with prompt templates for exporting diagrams, importing Mermaid, profiling a brand, and running a doctor check. Saved brand profiles live under ~/.diagram-design/profiles/ and survive package updates, and projects that carry a .diagram-design marker are left untouched by updates, which matters if you have customized the working style guide.
What the 39 types cover day to day
The catalog reads like a documentation team’s wish list. Architecture and ER diagrams cover the system design staples; sequence diagrams and state machines handle behavior over time; flowcharts and pyramids handle reasoning. The 2.5.10 release pushed Diagram Design into territory most diagram tools leave to specialists, adding Sankey flows, fishbone cause maps, Wardley maps, kanban boards, user journeys, deployment views, dependency graphs, UML class models, story maps, and database schemas.
What makes the catalog usable at scale is that all 39 types share one rendering pipeline and one brand profile. A team that adopts the skill does not accumulate 39 styles; it accumulates one style expressed through 39 structures. The practical test is to generate the same system as an architecture diagram and as a dependency graph and check whether they look like siblings. With Diagram Design they do, because the accent discipline and density target come from the profile rather than from whichever prompt you happened to write.
It is also worth noting what the skill refuses to do. There is no Figma handoff, no generic rounded box aesthetic, and no 30 minute color picking session. The README’s own framing, “no Mermaid slop”, is pointed, and the three static variants exist precisely so teams stop relitigating light versus dark on every diagram. You pick a house variant once and every future diagram inherits it.
The editorial discipline behind the output
The style philosophy is stated plainly in the project: the highest quality move is usually deletion. Every node in a diagram has to earn its place, the accent color is reserved for the one or two things the reader should look at first, and the target visual density is 4 out of 10. That discipline is what separates an editorial diagram from a shape dump, and it is enforced by the skill rather than left to the model’s judgment on each request.
For documentation-heavy teams the payoff compounds. Architecture pages, runbooks, and postmortems all start carrying diagrams that look like they belong to the same publication, because they were all generated through the same profile with the same constraints. Version 2.0’s shared pattern, flywheels drawn around a shared memory hub with dashed write back lines, shows the same idea at the semantic level: one well designed shape reused across documents instead of a dozen ad hoc reinventions.
How do semantic patterns keep the diagram type count small?
Version 2.3 introduced a quiet but important idea: behavior is described separately from layout. A queue, a policy trace, and a trust boundary are different behaviors, but any of them can be rendered through the nearest existing diagram type without inventing a fortieth, fiftieth, or sixtieth type. The semantic layer records what a diagram means, and the layout layer decides how it draws.
This matters for maintenance more than for aesthetics. When a skill grows one type per use case, every brand profile change, motion default, or accessibility fix has to be applied to a growing surface area. With semantic patterns, improvements land in the shared rendering path and every behavior description inherits them. It is the same instinct behind CSS design systems: fewer components, more composition.
For teams extending the skill, the rule of thumb is to describe the behavior you need first and check whether an existing type renders it well before asking for a new layout. The 2.5.10 batch of ten grammars covered the most requested gaps, but the project’s own framing suggests those additions are the exception, not the growth model.
The same separation explains how Diagram Design stays consistent across agents. Whether the request arrives through Claude Code, Codex, Factory Droid, or Pi, the skill receives a behavior description and renders it through the same pipeline with the same profile, so a team running two agents in parallel does not get two visual dialects. That consistency is easy to underestimate until you inherit a documentation set where half the diagrams came from one tool and half from another; the mismatch is subtle, constant, and expensive to fix after the fact.
When should you redraw an existing Mermaid or draw.io diagram instead of starting over?
Redrawing wins when the source is structurally correct and only the presentation is the problem, which describes most Mermaid output embedded in aging documentation. The skill accepts the existing source and re-renders it at a chosen format, size, and detail level, so the content decisions your team already made survive the restyle. That also makes the redraw path a low risk pilot: pick a page with an ugly but accurate diagram, regenerate it, and diff reader reactions before committing to broader use.
Start over instead when the source itself is the problem. A draw.io file nobody can parse anymore, a Mermaid chart that grew Knots of crossing lines, or a diagram whose assumptions no longer match the system all deserve a fresh pass driven by the current architecture, not a restyle of stale content. The redraw also changes the upkeep story: a diagram generated from a living source file can be regenerated in seconds during a documentation sprint, while a binary drawing tool export usually cannot.
A practical migration sequence for a documentation heavy repository: inventory every existing diagram, mark each one keep as is, redraw, or rebuild, and start with the redraw group because it is mechanical. Diagram Design’s redraw path takes the chosen format, size, and detail level as explicit inputs, so you can standardize those three answers across the whole set before touching the harder rebuild cases. Teams that run this sequence report the visible win arrives early, since even a partial pass removes the most jarring style clashes between new and old pages.
How do updates reach each agent client after you install?
Each client has its own update rhythm, and the project documents the differences precisely. Codex refreshes configured Git marketplaces at startup, with an explicit marketplace upgrade command when you cannot wait for a session restart. Factory Droid tracks Git plugins by commit rather than the manifest’s display version, so fetching a merged update means updating the marketplace, updating the plugin, and starting a new session. Pi uses an unpinned Git install on purpose, because it has no automatic package refresh, and pulls merged changes with an extensions update command.
Claude Code is the case worth flagging for teams: it disables auto update by default for third party marketplaces. After the first install, you enable auto update once from the marketplaces panel, after which the marketplace and the installed plugin refresh in the background after startup. Run the reload command when prompted, or let the next session pick the update up. The one time migration note matters if you installed an earlier standalone copy with the skills command: remove it and reinstall through the marketplace, or updates will not follow.
Saved brand profiles and project markers are the safety net under all of this. Profiles stored in the user home survive package updates, and a project that carries the marker file is left alone entirely, so an aggressive plugin update cannot silently restyle a finished document set. Treat those two mechanisms as part of the install, not an optional extra.
For teams running Diagram Design across several clients at once, the update story is a reason to pick a primary client rather than a reason to avoid the skill. Pin your documentation workflow to the client whose update cadence you can predict, use the others for experiments, and check the project’s release notes before updating mid sprint, because new layout grammars and pattern changes do land regularly. The repository is under active development, which is what you want from a diagram tool that just added ten types; it also means the installed version is part of your documentation toolchain and deserves the same pinning discipline as any other dependency.
What if your team needs Diagram Design to match a stricter house style?
Brand profiling gets you most of the way, since the skill reads your website’s palette and typography into a saved profile in about a minute. Teams with an enforced design system usually need one more step: the editable install. Clone the repository, install from the local path, and edit the working style guide directly, which changes what every future diagram considers correct. The tradeoff is that package updates no longer replace your customized style guide automatically, which is precisely the point for teams that treat the style guide as policy rather than preference.
The layered setup works well in practice. Keep the managed install for the rendering engine and its updates, keep the saved profiles for per brand palettes, and keep one project per house style with the marker file so finished work is immune to change. Because every Diagram Design output is plain HTML and SVG, an occasional exception can also be patched by hand without breaking anything; the file has no build step to re-run and no runtime to keep happy.
The discipline to hold on to is the density target and the accent rule, because those are what stop a customized style from sliding back into shape dump territory. A house style that changes colors but keeps the deletion mindset still produces editorial diagrams; one that only changes colors inherits the generic look with your logo on it.
Budget for the ownership honestly. An editable install means your team now maintains a fork of a style guide against an upstream that ships layout grammars and motion features regularly, so plan a short recurring review that folds upstream improvements into the fork. Teams that skip this drift onto an old version and eventually face a bigger rebase; teams that keep the review get upstream’s new diagram types with their own rules already applied, which is the best of both worlds.
One last practical note: keep one unmodified managed install somewhere in the organization as a reference. When a generated diagram looks wrong, the fastest diagnosis is comparing it against a diagram produced with the stock profile, which immediately tells you whether the fault lives in your customized style guide or in the request itself.