Skip to content
Diagram Design: 67k-Star AI Skill Generates Publication-Ready Diagrams

Diagram Design: 67k-Star AI Skill Generates Publication-Ready Diagrams

Diagram Design is an open-source AI agent skill for coding assistants like Claude Code, Codex, and Cursor that turns natural-language descriptions into polished architecture, flow, sequence, and other diagrams, exports them as HTML/SVG, and can restyle existing Mermaid or draw.io diagrams into a consistent visual language.

Programmer XiaoFu
Programmer XiaoFu
Programmer XiaoFu

The author describes the persistent pain point of creating diagrams for technical articles: Mermaid is fast but visually plain; draw.io requires manual alignment and styling; raw AI-generated SVG often has overlapping text, misrouted arrows, and poor color choices.

They discovered Diagram Design , an open-source project (GitHub: https://github.com/cathrynlavery/diagram-design) with 67k stars. It is packaged as an Agent Skill compatible with Claude Code, Codex, and Cursor. After installation, the developer opens an agent session and describes the desired diagram in natural language.

Capabilities

Supports a wide range of diagram types: architecture, flowchart, sequence, state machine, ER, timeline, swimlane, quadrant, radar, Gantt, data-flow.

Enforces a clean visual specification: grid alignment, thin lines, limited accent colors, minimal decoration — designed to guide the reader's eye to key nodes.

Can restyle existing Mermaid, draw.io, Excalidraw, or PlantUML diagrams into the same unified style.

Extracts colors and fonts from a given website to create a brand-specific style.

Problems Solved

Saves layout time — no need to manually position boxes, arrows, or spacing.

Controls visual emphasis — restricted accent palette prevents everything from looking equally important.

Reuses existing assets — old Mermaid/draw.io diagrams can be re-rendered for articles or slides.

Example Output

The author shows an AI-application architecture diagram (based on the project's public example-architecture.html) where the main request path — API Gateway → App Service → Model API, Redis, PostgreSQL — is highlighted with warm colors while secondary connections remain subdued.

Note: this image was produced by replacing the example with an AI scenario and screenshotting the browser-rendered HTML; it was not generated live in the author's agent session.

Installation & Usage

For agents that support Skills (Claude Code, Cursor): npx skills add cathrynlavery/diagram-design For Codex users:

codex plugin marketplace add cathrynlavery/diagram-design
codex plugin add diagram-design@diagram-design

Then start a new agent session and prompt, e.g.:

请画一张 AI 应用的生产架构图:用户从 Web/App 发起请求,
经过 API Gateway(鉴权、限流),进入应用服务;应用服务调用
大模型 API,并读写 Redis 缓存和 PostgreSQL。用架构图表达主请求路径,
突出模型调用,面向技术读者,适合公众号文章横向配图。

To apply brand styling, add:

请根据 https://你的官网地址 的颜色和字体,为 Diagram Design 配置品牌样式。

After verifying content and clarity, ask the agent to export PNG or SVG. PNG export requires Playwright + Chromium; preview works by opening the HTML file directly in a browser.

Limitations

Quality depends on the underlying LLM and the clarity of the prompt.

Output is not an editable canvas file (like draw.io); fine-grained layout tweaks require further agent prompts or direct SVG editing.

For diagrams that must evolve with code, Mermaid remains preferable because it lives in Markdown and is version-controlled alongside the codebase.

Diagram Design is best suited for diagrams that are created once and used repeatedly in publications, presentations, or reports.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cursordiagram generationtechnical writingCodexMermaidDiagram DesignClaude CodeAI agent skill
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.