Loading...
Loading...
Create editorial-quality diagrams in HTML + SVG matching your brand — architecture, flowcharts, sequences, timelines, quadrants, and 9 more types.
npx skill4agent add aradotso/design-skills diagram-design-editorialSkill by ara.so — Design Skills collection.
# Clone and symlink into Claude Code's skills directory
git clone git@github.com:cathrynlavery/diagram-design.git ~/code/diagram-design
ln -s ~/code/diagram-design/skills/diagram-design ~/.claude/skills/diagram-designdiagram-design/plugin marketplace add cathrynlavery/diagram-design
/plugin install diagram-design@diagram-designnpx skills add https://github.com/cathrynlavery/diagram-design --skill diagram-designYou: "onboard diagram-design to https://yoursite.com"
Claude: → fetches homepage
→ extracts dominant palette + font stack
→ maps to semantic roles (paper, ink, muted, accent)
→ shows proposed diff
→ writes to references/style-guide.md
You: "apply it"| From your site | Becomes |
|---|---|
| |
| Primary text color | |
| Secondary text | |
| Cards/containers | |
| Brand color (CTA/link) | |
| |
| |
| |
skills/diagram-design/references/style-guide.md"Make 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 diagram of the OAuth handshake."
"Create a timeline of our product milestones."style-guide.md| Type | Use for |
|---|---|
| Architecture | Components + connections |
| Flowchart | Decision logic |
| Sequence | Messages over time |
| State machine | States + transitions |
| ER / data model | Entities + fields |
| Timeline | Events on an axis |
| Swimlane | Cross-functional flow |
| Quadrant | Two-axis positioning |
| Nested | Hierarchy by containment |
| Tree | Parent → children |
| Org chart | Ownership + routing |
| Venn | Set overlap |
| Layers | Stacked abstractions |
| Pyramid / funnel | Ranked hierarchy or drop-off |
# Minimal light variant
cp assets/template.html my-diagram.html
# Full editorial with summary cards
cp assets/template-full.html my-diagram.html<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>App Architecture</title>
<style>
:root {
--paper: #FEFEFE;
--ink: #1A1A1A;
--accent: #EB6C36;
--muted: #64748B;
--hairline: #D1D5DB;
}
body {
margin: 0;
padding: 48px;
background: var(--paper);
font-family: 'Geist', -apple-system, sans-serif;
}
svg {
display: block;
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<svg viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg">
<!-- Frontend node (focal, coral tint) -->
<rect x="100" y="100" width="160" height="80"
fill="#FFF5F0" stroke="var(--accent)" stroke-width="2" rx="8"/>
<text x="180" y="145" text-anchor="middle"
font-size="14" font-weight="500" fill="var(--ink)">
Frontend
</text>
<!-- Backend node -->
<rect x="100" y="260" width="160" height="80"
fill="var(--paper)" stroke="var(--hairline)" stroke-width="1" rx="8"/>
<text x="180" y="305" text-anchor="middle"
font-size="14" font-weight="500" fill="var(--ink)">
Backend API
</text>
<!-- Database node -->
<rect x="400" y="260" width="160" height="80"
fill="var(--paper)" stroke="var(--hairline)" stroke-width="1" rx="8"/>
<text x="480" y="305" text-anchor="middle"
font-size="14" font-weight="500" fill="var(--ink)">
PostgreSQL
</text>
<!-- Connection lines -->
<path d="M 180 180 L 180 260" stroke="var(--muted)"
stroke-width="1" fill="none" stroke-dasharray="4 4"/>
<path d="M 260 300 L 400 300" stroke="var(--muted)"
stroke-width="1" fill="none" stroke-dasharray="4 4"/>
<!-- Labels on connections -->
<text x="190" y="220" font-size="10" fill="var(--muted)"
font-family="'Geist Mono', monospace">
HTTPS
</text>
<text x="310" y="290" font-size="10" fill="var(--muted)"
font-family="'Geist Mono', monospace">
SQL
</text>
</svg>
</body>
</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Decision Flow</title>
<style>
:root {
--paper: #FEFEFE;
--ink: #1A1A1A;
--accent: #EB6C36;
--muted: #64748B;
--hairline: #D1D5DB;
}
body {
margin: 0;
padding: 48px;
background: var(--paper);
font-family: 'Geist', -apple-system, sans-serif;
}
</style>
</head>
<body>
<svg viewBox="0 0 600 800" xmlns="http://www.w3.org/2000/svg">
<!-- Start node (pill shape) -->
<rect x="220" y="40" width="160" height="48"
fill="var(--ink)" rx="24"/>
<text x="300" y="68" text-anchor="middle"
font-size="12" font-weight="500" fill="var(--paper)">
Start
</text>
<!-- Decision node (diamond) -->
<path d="M 300 160 L 380 220 L 300 280 L 220 220 Z"
fill="var(--paper)" stroke="var(--hairline)" stroke-width="1"/>
<text x="300" y="225" text-anchor="middle"
font-size="12" fill="var(--ink)">
Valid user?
</text>
<!-- Process nodes -->
<rect x="420" y="196" width="140" height="48"
fill="var(--paper)" stroke="var(--hairline)" stroke-width="1" rx="8"/>
<text x="490" y="224" text-anchor="middle"
font-size="12" fill="var(--ink)">
Grant access
</text>
<rect x="40" y="196" width="140" height="48"
fill="#FFF5F0" stroke="var(--accent)" stroke-width="2" rx="8"/>
<text x="110" y="224" text-anchor="middle"
font-size="12" fill="var(--ink)">
Show error
</text>
<!-- Arrows -->
<path d="M 300 88 L 300 160" stroke="var(--muted)"
stroke-width="1" marker-end="url(#arrowhead)"/>
<path d="M 380 220 L 420 220" stroke="var(--muted)"
stroke-width="1" marker-end="url(#arrowhead)"/>
<path d="M 220 220 L 180 220" stroke="var(--accent)"
stroke-width="1" marker-end="url(#arrowhead-accent)"/>
<!-- Arrow markers -->
<defs>
<marker id="arrowhead" markerWidth="6" markerHeight="6"
refX="5" refY="3" orient="auto">
<polygon points="0 0, 6 3, 0 6" fill="var(--muted)"/>
</marker>
<marker id="arrowhead-accent" markerWidth="6" markerHeight="6"
refX="5" refY="3" orient="auto">
<polygon points="0 0, 6 3, 0 6" fill="var(--accent)"/>
</marker>
</defs>
<!-- Labels -->
<text x="390" y="210" font-size="10" fill="var(--muted)">Yes</text>
<text x="190" y="210" font-size="10" fill="var(--accent)">No</text>
</svg>
</body>
</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Product Timeline</title>
<style>
:root {
--paper: #FEFEFE;
--ink: #1A1A1A;
--accent: #EB6C36;
--muted: #64748B;
--hairline: #D1D5DB;
}
body {
margin: 0;
padding: 48px;
background: var(--paper);
font-family: 'Geist', -apple-system, sans-serif;
}
</style>
</head>
<body>
<svg viewBox="0 0 900 300" xmlns="http://www.w3.org/2000/svg">
<!-- Timeline axis -->
<line x1="100" y1="150" x2="800" y2="150"
stroke="var(--hairline)" stroke-width="1"/>
<!-- Event 1 (focal) -->
<circle cx="200" cy="150" r="8" fill="var(--accent)"/>
<text x="200" y="120" text-anchor="middle"
font-size="12" font-weight="500" fill="var(--ink)">
Beta Launch
</text>
<text x="200" y="180" text-anchor="middle"
font-size="10" fill="var(--muted)"
font-family="'Geist Mono', monospace">
Jan 2024
</text>
<!-- Event 2 -->
<circle cx="400" cy="150" r="6" fill="var(--muted)"/>
<text x="400" y="120" text-anchor="middle"
font-size="12" fill="var(--ink)">
Feature X
</text>
<text x="400" y="180" text-anchor="middle"
font-size="10" fill="var(--muted)"
font-family="'Geist Mono', monospace">
Mar 2024
</text>
<!-- Event 3 -->
<circle cx="600" cy="150" r="6" fill="var(--muted)"/>
<text x="600" y="120" text-anchor="middle"
font-size="12" fill="var(--ink)">
Public GA
</text>
<text x="600" y="180" text-anchor="middle"
font-size="10" fill="var(--muted)"
font-family="'Geist Mono', monospace">
May 2024
</text>
</svg>
</body>
</html>#FFF5F0accentpaperhairlinemutedskills/diagram-design/references/style-guide.md| Role | Token | Light default | Dark default |
|------------|--------------|---------------|---------------|
| Background | `paper` | `#FEFEFE` | `#0F0F0F` |
| Primary | `ink` | `#1A1A1A` | `#E5E5E5` |
| Accent | `accent` | `#EB6C36` | `#F97316` |
| Muted | `muted` | `#64748B` | `#94A3B8` |
| Hairline | `hairline` | `#D1D5DB` | `#334155` |
| Card | `paper-2` | `#F8F9FA` | `#1A1A1A` || Role | Family |
|------------|---------------------------------------------|
| Title | 'Instrument Serif', Georgia, serif |
| Node name | 'Geist', -apple-system, sans-serif |
| Sublabel | 'Geist Mono', 'SF Mono', Consolas, monospace|onboard diagram-design to <url>"Add an annotation to this diagram explaining why Redis sits between the backend and database."<!-- Annotation callout -->
<text x="520" y="340" font-size="11" font-style="italic"
font-family="'Instrument Serif', Georgia, serif" fill="var(--muted)">
Redis caches hot queries,
</text>
<text x="520" y="356" font-size="11" font-style="italic"
font-family="'Instrument Serif', Georgia, serif" fill="var(--muted)">
reducing DB load by 70%.
</text>
<!-- Dashed leader to relevant node -->
<path d="M 500 300 Q 510 320, 515 335" stroke="var(--muted)"
stroke-width="1" stroke-dasharray="2 3" fill="none"/>"Make this diagram look hand-drawn."<defs>
<filter id="sketchy">
<feTurbulence type="fractalNoise" baseFrequency="0.05" numOctaves="2" result="noise"/>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="2"/>
</filter>
</defs>
<!-- Apply to shapes -->
<rect x="100" y="100" width="160" height="80" filter="url(#sketchy)" ... />"Create a dark mode version of this diagram.":root {
--paper: #0F0F0F;
--ink: #E5E5E5;
--accent: #F97316;
--muted: #94A3B8;
--hairline: #334155;
}"Make a 2x2 showing product strategy: differentiation vs cost, and broad vs niche market."<!-- Top-left cell -->
<rect x="100" y="100" width="300" height="200"
fill="#FFF5F0" stroke="var(--accent)" stroke-width="2" rx="8"/>
<text x="250" y="190" text-anchor="middle"
font-size="14" font-weight="500" fill="var(--ink)">
Premium Niche
</text>
<text x="250" y="210" text-anchor="middle"
font-size="10" fill="var(--muted)">
High margin, focused
</text>open ~/.claude/skills/diagram-design/assets/index.htmlopen skills/diagram-design/assets/index.htmltemplate.htmltemplate-full.html<head><link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap" rel="stylesheet"><link href="https://cdn.jsdelivr.net/npm/@vercel/style-guide@latest/fonts/geist.css" rel="stylesheet">references/style-guide.md| Role | Token | Value |
|--------|----------|-----------|
| paper | `paper` | `#FFFFFF` |
| ink | `ink` | `#000000` |
| accent | `accent` | `#FF6B35` |style-guide.md"Make a sequence diagram of the login flow."
"Create an architecture diagram showing microservices."
"Build a quadrant chart for prioritization."SKILL.mdexport DIAGRAM_PAPER="#FEFEFE"
export DIAGRAM_INK="#1A1A1A"
export DIAGRAM_ACCENT="#EB6C36"<style>
:root {
--paper: ${DIAGRAM_PAPER};
--ink: ${DIAGRAM_INK};
--accent: ${DIAGRAM_ACCENT};
}
</style>style-guide.md# Using headless Chrome
npx playwright screenshot my-diagram.html my-diagram.png --full-page
# Or manually: open in browser, screenshot at 2x zoom for retina<iframe>references/type-custom.mdSKILL.md- **Custom diagram** — <use case>
- Trigger: "create a custom diagram"assets/example-custom.htmlskills/diagram-design/assets/index.html