{"slug": "diagram-design-the-agent-skill-that-draws-brand-matched-diagrams-in-claude-code", "title": "diagram-design: The Agent Skill That Draws Brand-Matched Diagrams in Claude Code and Codex", "summary": "The open-source agent skill diagram-design, which lets coding agents such as Claude Code and Codex generate brand-matched diagrams as a single self-contained HTML and SVG file, gained roughly 330 GitHub stars in a single day this week, according to the project's README. The skill installs via `npx skills add cathrynlavery/diagram-design` across hosts including Cursor, Claude Code, Codex, GitHub Copilot, Gemini CLI, Cline, Windsurf and Amp, and offers native plugin installs for Claude Code, Codex, GitHub Copilot, Factory Droid, Pi and Kiro. The README advertises 51 diagram types while the repo description says 45, a discrepancy the source could not reconcile, and the author notes the skill was not run for the article.", "body_md": "diagram-design is an open agent skill that makes your coding agent draw diagrams as one self-contained HTML and SVG file, in your own brand colours and fonts. It gained roughly 330 GitHub stars in a single day this week. You install it with one command, ask your agent for an architecture diagram or a sequence in plain words, and get a file you can open by double-clicking. The repo's tagline is blunt: no shadows, no Mermaid slop.\n\nThis post covers what the skill does, how to install it in Claude Code, Codex, Cursor and other hosts, how its import and export commands work, and what to verify before you trust it. All details come from the [project README](https://github.com/cathrynlavery/diagram-design?ref=explainx). We did not run the skill ourselves for this article, so behaviour described here is the README's account of it.\n\n## What diagram-design does\n\nThe README describes an agent skill that draws diagrams as one self-contained HTML plus SVG file, in your brand. You can ask for things like:\n\n- \"Make me an architecture diagram of my app: frontend, backend, database, Redis cache.\"\n- \"I need a quadrant showing Q2 projects by impact vs effort.\"\n- \"Give me a sequence of a bearer call with token refresh on 401.\"\n- \"Onboard diagram-design to [https://yoursite.com](https://yoursite.com/?ref=explainx) \", which pulls your palette and fonts so later diagrams match your site.\n\nThe agent picks the type, states its plan, and writes one `.html` file. The README headline says 51 diagram types, while the repo description says 45; we could not reconcile the two, so check the gallery for the current list. The reference folder lists type files for architecture, data flow, database schema, ER, flowchart, Gantt, heatmap, kanban, Sankey, sequence, state, swimlane, timeline, UML class and many more.\n\nIf you have read our explainer on [Mermaid slop](https://explainx.ai/blog/what-is-mermaid-slop-ai-diagram-explained-2026), the pitch will sound familiar. Generic auto-laid-out AI diagrams look the same everywhere. diagram-design answers that with a design system: a 4px grid, a single style guide as the source of truth for colours and fonts, per-type layout budgets, and primitives for nodes, arrows and labels.\n\n## Install in one command\n\nThe cross-agent route works with any host that reads Agent Skills, which the README lists as Cursor, Claude Code, Codex, Qoder, GitHub Copilot, Gemini CLI, Cline, Windsurf and Amp:\n\n```\nnpx skills add cathrynlavery/diagram-design\n```\n\nThe skills CLI finds `skills/diagram-design/SKILL.md` and installs the whole skill, including references, assets and scripts, into each host you select. If your selection resolves to more than one skills folder, it asks for an install method and recommends symlinks so one update reaches every tool. Pass `--copy` for independent copies. This standalone install does not follow marketplace updates; run `npx skills update diagram-design` to pull them.\n\nNative installs give you the slash commands too:\n\n| Host | Install command (per README) | \n|---|---|\n| Claude Code | `/plugin marketplace add cathrynlavery/diagram-design` , then`/plugin install diagram-design@diagram-design` | \n| Codex | `codex plugin marketplace add cathrynlavery/diagram-design` , then`codex plugin add diagram-design@diagram-design` | \n| GitHub Copilot | `copilot plugin marketplace add cathrynlavery/diagram-design` , then`copilot plugin install diagram-design@diagram-design` | \n| Factory Droid | `droid plugin marketplace add https://github.com/cathrynlavery/diagram-design` , then`droid plugin install diagram-design@diagram-design --scope user` | \n| Pi | `pi install https://github.com/cathrynlavery/diagram-design` , then`/reload` | \n| Kiro | Import the skill from the repo's `skills/diagram-design` subdirectory URL | \n\nTwo practical notes. In Claude Code, third-party marketplaces have auto-update off by default; the README says to run `/plugin`, open Marketplaces, select diagram-design and enable auto-update. And the README states that official builds come only from this repository: listings under any other name are unofficial copies. That matters because agent skills run with your agent's permissions. For another recent example of an agent-tool repo with a multi-host installer, see our report on the [app-store-compliance guard](https://explainx.ai/blog/app-store-compliance-playbook-pre-submission-guard-claude-code-github-trending-2026).\n\n## Match your brand once, reuse it everywhere\n\nOnboarding is the feature that separates this from a one-off prompt. You give the skill a URL and it extracts the palette and fonts into a style guide. If the project has no style guide yet, the skill asks whether to run onboarding, paste tokens manually or proceed with the default, per the README.\n\nFor agencies and freelancers, there are named profiles. You onboard a brand once, save it as a profile, then add a `.diagram-design` marker file containing `profile: <slug>` to each client project. Marker projects read the profile from `~/.diagram-design/profiles/<slug>.md`, so parallel workspaces can use different brands without overwriting a shared style guide. The profile library is shared across Claude Code, Codex, Factory Droid and Pi.\n\n## Import Mermaid, draw.io, Excalidraw and PlantUML\n\nIf you already have diagrams, the skill redraws them rather than converting them. The commands in the README include:\n\n```\n/diagram-design:import-drawio platform.drawio\n/diagram-design:import-mermaid README.md --diagram=all\n/diagram-design:import-excalidraw whiteboard.excalidraw --size=slide-16x9 --detail=simplified\n/diagram-design:import-plantuml sequence.puml\n```\n\nSupported inputs are broad. For draw.io it reads `.drawio`, `.drawio.xml`, `.drawio.png` with an embedded diagram, and `.drawio.svg`, including compressed payloads. For Mermaid it accepts `.mmd`, `.mermaid` and fenced blocks in Markdown. For Excalidraw it accepts scene files but not PNG or SVG exports. PlantUML import covers sequence and class diagrams only. The README says import parses text only: no rendering, no JavaScript, no browser, no network, no PlantUML runtime, and no followed click targets.\n\n### The four dials\n\nThe point of import, in the README's words, is not conversion but fitting the output to where it goes. Four dials control that:\n\n| Dial | Options | What it changes | \n|---|---|---|\n| Format | html, svg, png, html+png | The deliverable | \n| Size | doc-inline, doc-wide, slide-16x9, slide-4x3, social-og, social-square, print sizes, fit | The viewBox and type ramp; a slide gets larger text | \n| Detail | faithful (up to 24 nodes), balanced (up to 12), simplified (up to 7) | How much of the source survives | \n| Audience | engineer, mixed, executive | The wording, not the count | \n\nThe audience dial has a nice example in the README: \"Auth Service / JWT · RS256 · :8443\" becomes \"Auth Service / token check → Sign-in\" for an executive audience. Every import ends with a fidelity ledger that lists what was merged, collapsed or dropped, such as a decision node folded into an edge label or an unconnected sticky note removed. What never carries over: source coordinates, palette, fonts, draw.io's diagonal connectors, Mermaid's automatic layout and PlantUML skinparams. What always carries over: components, relationships, grouping and direction.\n\n## Export to SVG and PNG\n\nDiagrams ship as HTML, but you can export the diagram itself for Figma, slides or social cards with `/diagram-design:export-diagram` in Claude Code, or `/export-diagram` in Pi and Factory Droid. Flags include `--svg-only`, `--png-only --scale=3` and `--registry`. SVG export injects Google Fonts so it renders standalone in browsers, Figma and Illustrator; `--system-fonts` skips that for offline use. PNG uses [Playwright](https://playwright.dev/python/docs/intro?ref=explainx) at 2x by default and needs `pip install playwright && playwright install chromium` once.\n\nNote that exports are diagram-only: editorial cards and headers from the \"full\" template variants are not included. For the full editorial layout, use your browser's print-to-PDF or a full-page screenshot. The `--registry` flag writes a JSON sidecar of block metadata for diagrams that use the traceable block decomposition pattern.\n\n## Semantic patterns and optional motion\n\nWhen behaviour matters, the skill picks a semantic pattern first and a visual type second. The README names nine routed patterns: fan-in queues and bottlenecks, repeated stage slots, unstructured-input transformation, paired policy traces, secure paved roads, governance catalogs, compensating security layers, traceable block decomposition and lifecycle phase maps. Each defines its triggers, a budget and a static fallback.\n\nMotion is optional and defaults to none. Modes are none, reveal, step and loop, each with a complete static first frame, deterministic timing and controls. Reduced-motion output shows the full static frame. The README says motion HTML uses one reviewed controller from `template-motion.html`, and that arbitrary or modified inline scripts, remote assets, CSS imports and executable HTML attributes are rejected. Ordinary output is static and script-free. That is a sensible security stance for a tool that generates HTML files you will share.\n\n## How it compares with other ways to draw\n\n| Approach | Strength | Weakness | \n|---|---|---|\n| Mermaid in Markdown | Text source, renders in many tools | Automatic layout, generic look | \n| draw.io or Excalidraw | Manual control | Hand work, hard to keep a brand consistent | \n| An agent drawing raw SVG | Fast | Inconsistent spacing and style without rules | \n| diagram-design | Design system, brand profiles, imports, exports | Depends on the agent following a long skill; young project | \n\nThe gap it targets is consistency. Agents can already draw an SVG, but the result changes with every prompt. A skill with a style guide, grid and per-type budgets pushes the agent to the same output each time. Our write-up of [a Claude Code skill for isometric interactive figures](https://explainx.ai/blog/anatomy-claude-code-skill-isometric-interactive-figures-wheresryan22-2026) shows the same idea in another style, and Karpathy's push for [diagrams, HTML and video to understand LLM outputs](https://explainx.ai/blog/karpathy-understand-llm-outputs-ste100-diagrams-html-video-2026) explains why visual outputs are gaining ground.\n\n## Limits and what to check first\n\n- **Unverified claims.** The README says 51 types, the description says 45. We did not count them, and we did not generate diagrams. Open the gallery at`skills/diagram-design/assets/index.html` in a clone to judge quality yourself.\n- **Agent dependence.** Quality depends on the agent following the skill. Weaker or smaller models may drift from the style guide. The`/doctor` command checks your environment.\n- **PNG export needs Playwright and Chromium** , which is a heavy one-time install.\n- **Imports are lossy by design.** The detail and audience dials drop nodes. Read the fidelity ledger before you ship a diagram to a client.\n- **Third-party skill risk.** Read the repo's[PRIVACY.md](https://github.com/cathrynlavery/diagram-design/blob/main/PRIVACY.md?ref=explainx) and`SECURITY.md` , install only from the official repository, and review commands before running them in a work tree.\n- **Maintenance.** It is a single-author project with a company behind the plugin listings and a large commit history (473 commits per the repo page), which suggests active work but no support guarantee.\n\nIf you build with several agent plugins, the broader ecosystem trend is covered in our look at [agent plugin standards across OpenAI, AWS, Cursor and GitHub](https://explainx.ai/blog/agent-plugins-openai-standard-aws-cursor-github-vscode-2026).\n\n## Who should try it\n\n- **Developers writing docs and READMEs** who want architecture and sequence diagrams without opening a drawing tool.\n- **Founders and marketers** who need slide-sized or social-sized diagrams that match the brand site.\n- **Teams migrating old Mermaid or draw.io files** into one consistent look.\n- **Agencies** that juggle several brands and can use the profile marker per client.\n\nStart small. Install with `npx skills add cathrynlavery/diagram-design`, ask for one architecture diagram of a project you know well, and compare it with what you would draw by hand. If the result passes your own review, onboard your brand and reuse it. Follow [@explainx_ai](https://x.com/explainx_ai?ref=explainx) for more trending agent tools.", "url": "https://wpnews.pro/news/diagram-design-the-agent-skill-that-draws-brand-matched-diagrams-in-claude-code", "canonical_source": "https://explainx.ai/blog/diagram-design-agent-skill-html-svg-diagrams-claude-code-codex-github-trending-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-11-19 00:00:00+00:00", "updated_at": "2026-11-19 13:45:24.270581+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["diagram-design", "Claude Code", "Codex", "Cursor", "GitHub Copilot", "Gemini CLI", "Cline", "Windsurf"], "also_reported_by": [], "takeaway": "Install diagram-design with `npx skills add cathrynlavery/diagram-design` to have a coding agent emit one self-contained HTML-plus-SVG diagram file in your brand palette and fonts, using symlinks when installing to multiple hosts so one update reaches every tool.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/diagram-design-the-agent-skill-that-draws-brand-matched-diagrams-in-claude-code", "markdown": "https://wpnews.pro/news/diagram-design-the-agent-skill-that-draws-brand-matched-diagrams-in-claude-code.md", "text": "https://wpnews.pro/news/diagram-design-the-agent-skill-that-draws-brand-matched-diagrams-in-claude-code.txt", "jsonld": "https://wpnews.pro/news/diagram-design-the-agent-skill-that-draws-brand-matched-diagrams-in-claude-code.jsonld"}}