AI-generated diagrams are finally presentable: this open-source project has written aesthetics into code
An open-source Agent Skill that lets Claude Code, Codex, and other AI coding assistants create professional, on-brand diagrams. 52 types, one-command install, and natural-language descriptions generate HTML+SVG files directly. After release, a commenter summed it up: “71k stars for a diagram skill. people really hate the default gray-box-and-arrow diagrams.”
AI-generated diagrams have a common problem: they're ugly. The information in the diagram is mostly right, but the aesthetics are off. Gray boxes, black arrows, rounded shadows—Mermaid's default style runs through every AI tool. Ask Claude to draw an architecture diagram, and nine times out of ten you get a template-y gray box.
Cathryn Lavery had had enough. She built an open-source project, Diagram Design, an Agent Skill that writes design rules directly into the AI's workflow. The project sparked discussion on X, and one commenter nailed it: “71k stars for a diagram skill. people really hate the default boxes and arrows.” People really hate the default gray-box-and-arrow diagrams.

An Agent Skill can be understood as a skill pack installed into an AI coding assistant. Once installed, the AI gains a new professional capability: generating diagrams from natural-language descriptions. Diagram Design is compatible with mainstream tools such as Claude Code, Codex, Cursor, GitHub Copilot, and Gemini CLI.
It's simple to use, in three steps:
- Install:
npx skills add cathrynlavery/diagram-design - Describe: tell the AI what diagram you want
- Generate: get an HTML file; double-click to open it in a browser
The entire output is a single HTML+SVG file, with no build step, no JavaScript, and no external image dependencies. The only possible network request is loading fonts from Google Fonts; you can also switch to system fonts for fully offline use.

Good looks come with a set of hard rules. The project README has a line: No Mermaid slop. No cookie-cutter Mermaid template feel.
- 4px grid: all coordinates, widths, and spacing must be divisible by 4
- 1px hairline borders
- No shadows
- Maximum corner radius of 10px
- One accent color, used only for the 1-2 core elements readers should notice first
- Target information density: 4/10
The author wrote these rules into documentation, and the AI reads them before every diagram. Aesthetics have been turned into executable hard constraints.
The README puts it bluntly: “The highest-quality editing move is usually deletion. Every node has to earn its place.”
Supports 52 diagram types: architecture diagrams, flowcharts, sequence diagrams, state machines, ER diagrams, Gantt charts, quadrant charts, radar charts, cycle diagrams, Venn diagrams, pyramids, Sankey diagrams, fishbone diagrams, kanban boards, user journeys, UML class diagrams, Git graphs, and more. Each type comes in three variants: light, dark, and full editorial style.
![]()
Compared with mainstream diagramming tools:
| Mermaid / PlantUML | draw.io / Excalidraw | Diagram Design | |
|---|---|---|---|
| Creation method | Write text | Draw manually | Describe to AI |
| Layout | Automatic | Manual | AI lays it out on a 4px grid; CI checks for overlap and clipping |
| Appearance | Renderer theme | Depends on your drawing skills | Consistent editorial style that matches your brand |
| Output | Text, rendered by GitHub | Editable file | Single HTML+SVG, exportable |
| Editing | Change the text | Change the canvas | Ask AI to change it or edit the SVG directly |
Drawbacks are also laid out. Output quality depends on the model you use; the same instruction may produce different layouts on two runs. The result is not an editable source format, so you can't diff it in a PR. For diagrams that live in Git and change every two weeks, Mermaid is still the right choice. Diagram Design is for diagrams you want to publish.
Brand matching is the killer feature. Tell the AI “onboard diagram-design to https://yoursite.com”, and it will crawl your site, extract the primary colors and fonts, and map them to the diagram's design variables: your site background becomes the canvas, your CTA button color becomes the accent color, and heading and body fonts map one-to-one. The whole process includes automatic contrast checks; text and background must pass WCAG AA, and if they don't, it suggests adjustments. The default skin is ink black + orange and works out of the box, but after a 60-second brand adaptation, every diagram looks like your site.
Existing diagrams can be rescued too. draw.io, Mermaid, Excalidraw, and PlantUML files can be thrown directly at it for redrawing: content stays the same, but it gets a new design system. The several colors in the source file are unified into one accent color, and hand-dragged coordinates are snapped to the 4px grid. Redrawing has four adjustment parameters: format, size, level of detail, and audience. At the end of each import, the AI outputs a list telling you which nodes were merged, trimmed, or dropped.
![]()
Export is also convenient: SVG extracts nodes directly, and PNG is rasterized at 2x resolution via Playwright, suitable for Figma or slides.
The author, Cathryn Lavery, has a background unrelated to developer tools. She built the paper-goods brand BestSelf.co; its SELF Journal got its start through a Kickstarter campaign, was sold to a private equity fund in 2022, and then she bought it back 14 months later. She writes a blog and creates AI content, and she found that models already understand content—what they lack is aesthetics. So she wrote aesthetics into documentation.
The project took off not because of flashy features. AI-generated diagrams being ugly is a widespread pain point, and someone finally tackled it seriously. She didn't preach big ideas; she simply turned the phrase “less is more” into executable rules.
发布时间: 2026-11-24 05:44