Repo Trending

cathrynlavery/diagram-design

Agent skill that draws editorial diagrams as single self-contained HTML+SVG files in your brand. 44 diagram types, no shadows, 4px grid, works across many AI coding agents.

  • 72.2k GitHub stars
  • HTML

Last verified: repo last pushed

npx skills add cathrynlavery/diagram-design
cathrynlavery/diagram-design preview image

What it is

Diagram Design is an agent skill for Claude Code, Codex, Copilot, Cursor and other Agent Skills hosts. You describe a diagram in plain words, and the agent picks the type, states its plan, and writes one .html file with inline SVG that opens by double-clicking. It covers 44 diagram types, each in minimal light, minimal dark and full-editorial variants, with design rules baked in: one accent color, 1px hairlines, no shadows, and coordinates on a 4px grid. An onboarding step can pull your site's palette and fonts so later diagrams match your brand.

Who it's for

  • Developers and writers who want publishable, on-brand diagrams for blog posts and docs without fighting a drawing tool
  • Users of Claude Code, Codex, GitHub Copilot, Factory Droid, Pi, Cursor and other Agent Skills-compatible hosts
  • People who want to redraw existing Mermaid, draw.io or Excalidraw diagrams in a consistent editorial style

Requirements

Requirements

  • An agent host that reads Agent Skills (e.g. Claude Code, Codex, GitHub Copilot, Factory Droid, Pi, Cursor, Gemini CLI, Cline, Windsurf, Amp)
  • npx, for the cross-agent skills CLI install
  • A modern browser to open the output HTML files (no build step, JavaScript, or external image dependency)

Setup

  1. Install on any Agent Skills host

    Installs the whole skill into the host roots you select. This standalone install covers the Agent Skill only, not the /export-diagram, /import-mermaid, /profile and /doctor commands. Update with npx skills update diagram-design.

    bash
    npx skills add cathrynlavery/diagram-design
  2. Claude Code plugin marketplace

    Gives updates and the slash commands. Auto-update can be enabled via /plugin → Marketplaces → diagram-design → Enable auto-update.

    text
    /plugin marketplace add cathrynlavery/diagram-design
    /plugin install diagram-design@diagram-design
  3. Codex

    Codex refreshes configured Git marketplaces at startup. To fetch immediately, run codex plugin marketplace upgrade diagram-design and start a new session.

    bash
    codex plugin marketplace add cathrynlavery/diagram-design
    codex plugin add diagram-design@diagram-design
  4. GitHub Copilot

    Installs the shared skill plus doctor, export, import and profile capabilities. Confirm with copilot skill list (or /skills in an interactive session).

    bash
    copilot plugin marketplace add cathrynlavery/diagram-design
    copilot plugin install diagram-design@diagram-design
  5. Factory Droid

    Droid tracks Git plugins by commit. Update with droid plugin marketplace update diagram-design, then droid plugin update diagram-design@diagram-design --scope user, and start a new session.

    bash
    droid plugin marketplace add https://github.com/cathrynlavery/diagram-design
    droid plugin install diagram-design@diagram-design --scope user
  6. Pi

    Run /reload in an open Pi session. Use /skill:diagram-design to invoke it explicitly. Update with pi update --extensions.

    bash
    pi install https://github.com/cathrynlavery/diagram-design

Examples

Architecture diagram request

Prompt
prompt
Make me an architecture diagram of my app: frontend, backend, database, Redis cache.

Expected output: Plain-language request; the agent picks the diagram type, states its plan, and writes a single .html file.

Quadrant request

Prompt
prompt
I need a quadrant showing Q2 projects by impact vs effort.

Expected output: Shows that the agent chooses an appropriate type (here quadrant) from the 44 available.

Sequence diagram request

Prompt
prompt
Give me a sequence of a bearer call with token refresh on 401.

Expected output: Produces a sequence diagram of messages over time from a short description.

Brand onboarding

Prompt
prompt
onboard diagram-design to https://yoursite.com

Expected output: The agent fetches the homepage, extracts the dominant palette and font stack, maps them to roles (paper, ink, muted, accent, link), shows a proposed diff, and writes the tokens to references/style-guide.md once you approve.

Pros & cons

Pros

  • Pro:44 diagram types, each in minimal light, minimal dark and full-editorial variants
  • Pro:Output is one self-contained HTML+SVG file with no build step, JavaScript, or external image dependency
  • Pro:Onboarding pulls palette and fonts from your website so diagrams match your brand, with a fidelity receipt
  • Pro:Layout is placed on a 4px grid, with CI checks for overlaps and clipping

Cons

  • Con:Output quality depends on the model, and the same prompt can lay out differently twice
  • Con:Output is not an editable source format: no text to diff in a pull request and no canvas to drag boxes on
  • Con:The README says Mermaid is the better fit for docs that live in Git and change every sprint

Images