How to draw diagrams as HTML in Claude Code and Codex with the diagram-design skill
diagram-design is a skill that has your agent draw diagrams such as architecture maps, sequences and quadrants as a single self-contained HTML + SVG file. It covers 51 diagram types and can also redraw Mermaid, draw.io, Excalidraw and PlantUML files in the same design.
- In Claude Code, install it from the plugin marketplace. This also brings in the slash commands.
/plugin marketplace add cathrynlavery/diagram-design
/plugin install diagram-design@diagram-design
For Codex, install it from the terminal.
codex plugin marketplace add cathrynlavery/diagram-design
codex plugin add diagram-design@diagram-design
- Ask in plain words. The agent picks the type, states its plan, and writes one
.htmlfile you can open by double-clicking. SayOnboard diagram-design to https://yoursite.comand it pulls your site's palette and fonts so later diagrams match.
Make me an architecture diagram of my app: frontend, backend, database, Redis cache.
- Import existing diagrams to redraw them.
--sizesets the slide or document size and--detailsets how many nodes survive.
/diagram-design:import-mermaid architecture.mmd --size=slide-16x9 --detail=simplified
To export PNG or SVG, use /diagram-design:export-diagram path/to/diagram.html. PNG export uses Playwright, so run pip install playwright && playwright install chromium once first. Claude Code turns off auto-update for third-party marketplaces by default, so enable it under /plugin → Marketplaces. The latest release is 2.6.170 (November 22), under the MIT license.
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.