Diagram Design: A Lightweight HTML/SVG System for AI Code Editors
4 min read

Diagram Design is a specialized system for generating diagrams directly within AI code editors. Rather than relying on heavy rendering libraries, it produces diagrams as single HTML and SVG files that can be opened by double-clicking. The project has reached 70,725 stars on GitHub and positions itself as an alternative to existing diagram tools, emphasizing simplicity and integration with modern AI development workflows.
The core idea is straightforward: when you ask an AI agent for a diagram in plain language—"Make me an architecture diagram of my app: frontend, backend, database, Redis cache"—the agent selects an appropriate diagram type, states its plan, and outputs one .html file. No external dependencies. No rendering overhead. The file opens in any browser and can be exported to PNG or SVG.
Why it matters
AI code editors like Claude Code, Cursor, and GitHub Copilot have become primary development environments for many engineers. These tools excel at code generation and reasoning, but diagram creation has remained awkward: either users switch to external tools, or the AI generates Mermaid syntax that may render inconsistently. Diagram Design bridges this gap by making diagram generation a native capability of the agent itself.
The emphasis on HTML and SVG—rather than JavaScript rendering libraries—matters for several reasons. First, it eliminates runtime dependencies; a diagram is just markup and vector graphics. Second, it ensures diagrams render identically everywhere. Third, it makes the output lightweight and portable. The project explicitly rejects what it calls "Mermaid slop," suggesting frustration with inconsistent rendering and bloated output from existing diagram libraries.
The system supports 52 diagram types, covering common use cases: architecture diagrams, quadrant charts, sequence diagrams, flowcharts, and more. This breadth means agents can handle diverse requests without falling back to text descriptions or external tools.
How it works
Agent skill architecture
Diagram Design operates as an agent skill—a capability that can be installed into multiple AI development environments. When installed, the skill teaches the agent how to generate diagrams. The agent receives a natural-language request, reasons about which diagram type fits best, and invokes the skill to produce the output.
Brand customization
The system includes an onboarding flow where users can point it to their website. The skill then extracts the site's color palette and fonts, ensuring all subsequent diagrams match the user's brand. This is handled through a /profile command that captures design tokens from a live URL.
Import and export
The skill can import diagrams from other formats—Drawio, Mermaid, Excalidraw, and PlantUML—converting them into Diagram Design's HTML/SVG output. It can also export diagrams to PNG or SVG, making it compatible with downstream workflows.
How to try it
Installation varies by AI editor. For most environments using the Agent Skills CLI:
npx skills add cathrynlavery/diagram-design
For Claude Code specifically, use the plugin marketplace:
/plugin marketplace add cathrynlavery/diagram-design
/plugin install diagram-design@diagram-design
After installation, you can ask the agent for diagrams in natural language. Examples from the README include:
- "Make me an architecture diagram of my app: frontend, backend, database, Redis cache."
- "I need a quadrant showing Q2 projects by impact vs effort."
- "Give me a sequence of a bearer call with token refresh on 401."
The agent will output a .html file that you can open directly. For detailed setup instructions specific to your editor (Cursor, Cline, Codex, GitHub Copilot, Gemini CLI, Windsurf, Amp, Zed, Warp, Roo, Kilo, or others), see the README.
Claude Desktop users should build a bounded ZIP from a local checkout:
python3 scripts/build-claude-skill-zip.py
Then upload the resulting dist/diagram-design-claude-skill.zip through Customize → Skills.
Who it's for (and limits)
Diagram Design is designed for engineers and teams using AI code editors as their primary development environment. It's particularly useful for:
- Quick architecture and system design documentation
- Sequence diagrams for API flows or authentication patterns
- Quadrant and matrix diagrams for planning and prioritization
- Embedding diagrams in documentation or presentations
The project explicitly supports Claude Code, GitHub Copilot, Cursor, and other AI-native tools. It also works with Codex, Qoder, Cline, Gemini CLI, Windsurf, Amp, and several others—each with slightly different installation paths documented in the README.
One important note: the project emphasizes that official builds come only from the GitHub repository. Unofficial copies under other names should be avoided.
The system is open source and accepts contributions. The README includes a PRIVACY.md file documenting what data, if any, the skill sends over the network.
Links
Also trending that day
The day's GitHub and Hugging Face picks side by side.
| Project | Source | ★ | Language / Type |
|---|---|---|---|
| elementalsouls/Claude-BugHunter | GitHub | 19,029 | Python |
| HKUDS/CLI-Anything | GitHub | 63,288 | Python |
| jingyaogong/minimind | GitHub | 69,266 | Python |
| openvinotoolkit/openvino | GitHub | 12,217 | C++ |
| cathrynlavery/diagram-design | GitHub | 70,725 | HTML |
| thinkingmachines/Inkling-2-Mini | Hugging Face | 5,301 | image-text-to-text |
| unsloth/Inkling-2-Mini-GGUF | Hugging Face | 1,010 | image-text-to-text |
| inworld/voice-isolator | Hugging Face | 696 | audio-to-audio |
| AtomicChat/Inkling-2-Mini-Uncensored-GGUF | Hugging Face | 585 | image-text-to-text |
| harness-hub/Qwen3.8-27B-pi-adapted | Hugging Face | 1,016 | image-text-to-text |