Diagram Creator
Generate stunning, self-contained HTML diagrams with professional typography, smooth animations, and an infinite canvas you can pan and zoom like Miro. Output is always a single .html file that opens directly in any browser — zero dependencies. Supports 5 themes and 8 topology layouts.
Input Handling
Accept any of these inputs and auto-process them:
| Input type |
How to handle |
| Topic/description |
"Docker networking", "OAuth 2.0 flow" — use directly |
| Markdown (.md, .mdx) |
Extract structure from headings, lists, tables, relationships |
| JSON / YAML (.json, .yaml, .yml, .jsonl) |
Parse structure — keys become nodes, nesting becomes layers |
| Code files (.py, .ts, .js, .go, .rs, .java, .rb, .php, .swift, .kt, .c, .cpp, .cs, .scala, etc.) |
Extract classes, functions, imports, inheritance — diagram the architecture |
| Config / Infra (.toml, .ini, .env, .tf, .hcl, Dockerfile, docker-compose.yml, Makefile, nginx.conf) |
Map services, variables, dependencies, infrastructure |
| API specs (.openapi.yaml, .swagger.json, .graphql, .proto) |
Extract endpoints, types, service relationships |
| Database schemas (.sql, .prisma, .dbml) |
Map tables, columns, foreign keys, relationships |
| CI/CD pipelines (.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile) |
Visualize pipeline stages and deployment flows |
| Data files (.csv, .tsv) |
Identify columns as entities, rows as relationships |
| Microsoft Office (.xlsx, .xls, .docx, .doc, .pptx, .ppt) |
Extract tables, headings, slide structure, org charts, SmartArt |
| Package manifests (package.json, requirements.txt, Cargo.toml, go.mod, pom.xml) |
Map dependency trees |
| Existing diagrams (.drawio, .puml, .mermaid) |
Read spec and re-render with this design system |
| PDF / Docs (.pdf, .txt, .rst, .adoc) |
Read content, extract core structure |
| Notebooks (.ipynb) |
Extract code cells, data flow, library dependencies |
If it's a file, this skill can diagram it. For formats not listed, read the content and extract whatever structure exists.
When receiving a file path, read the file, detect the extension, and intelligently extract what matters for the diagram. Don't ask the user to reformat — figure it out.
If the input is genuinely ambiguous (no clear structure to extract), ask clarifying questions before proceeding. See "Pre-generation Questions" below.
Pre-generation Questions
Always ask these questions before generating, unless the answer is completely obvious from the input. Ask one question at a time — wait for the user's answer before moving to the next. Present every question as a numbered list so the user can simply reply with a number.
Skip a question ONLY when the answer is unambiguous — e.g., "diagram of Docker bridge networking" makes topology (nested) and detail level (medium) obvious. When in doubt, ask.
Question flow (one at a time, in this order):
What to visualize? (skip only if input is already specific)
Present 2-3 interpretations of the input as numbered options, plus an "Other" option. Tailor the options to what the user actually asked — don't use generic placeholders.
What do you want to visualize?
1) [interpretation A]
2) [interpretation B]
3) Other — describe below
→ Reply with the number:
Layout? (skip if only one topology realistically fits — choose automatically in Step 0)
Only list the 2-3 topologies that could realistically fit, not all 8. Adapt options based on the previous answer.
Layout?
1) Left-to-right — sequential flow
2) Timeline — vertical step sequence
→ Reply with the number:
Detail level?
Detail level?
1) High-level — main entities only, understand in 5 seconds
2) Medium — entities with key info, labeled connections (default)
3) Detailed — full technical breakdown, all metadata
→ Reply with the number (default: 2):
Theme?
Theme?
1) Dark (default)
2) Light
3) Corporate
4) Neon
5) Minimal
→ Reply with the number (default: 1):
Once you have all the answers, proceed autonomously through all remaining steps without further questions.
Step 0 — Choose the Topology
Pick exactly one topology based on what fits the content best:
| Topology |
When to use |
Examples |
nested |
Hierarchical containment, layers wrapping layers |
Docker networking, K8s pods, OSI model, VPC subnets |
left-to-right |
Sequential flow from A to Z |
OAuth flow, CI/CD pipeline, user journey, request lifecycle |
hub-and-spoke |
Central node connected to N surrounding nodes |
API gateway, microservices, load balancer, team structure |
timeline |
Ordered vertical sequence of events/steps |
Deploy pipeline, project roadmap, historical events |
grid |
Matrix/table comparison, feature grids |
Feature comparison, skill map, competitive landscape |
tree |
Hierarchical branching, org charts |
Org chart, file tree, decision tree, taxonomy |
funnel |
Progressive narrowing, conversion stages |
Sales funnel, data pipeline, filtering process |
comparison |
Side-by-side 2-3 options |
Product vs product, technology choices, before/after |
Step 1 — Plan the Content
Before writing HTML, plan these elements in your thinking:
- Topic: one sentence describing what the diagram shows
- Detail level: choose one of three levels. Default to medium unless context suggests otherwise:
- High-level — Only the main entities of the system. Aggregate similar entities into single boxes (e.g., "Backend Services" instead of listing 10 microservices). No metadata in boxes — just name and role. Minimal connection labels. No callouts, badges, or notes. The viewer should understand the structure in 5 seconds.
- Medium (default) — The entities needed to understand how the system works, without sub-components. Each box gets 1-2 metadata relevant to the domain (infra: port and protocol; org chart: role and team; flow: input/output of each step). Label connections where it adds clarity. Callouts only for non-obvious key concepts. The viewer who knows the domain should understand the diagram without further explanation.
- Detailed — Everything: sub-components, configurations, technical notes. All relevant metadata per box (ports, protocols, versions, env vars, states). Badges, explanatory callouts, side notes. Goal: complete technical reference for people working on the system.
How to choose: (1) If the user specifies a level explicitly, use it. (2) If context clarifies intent — a presentation implies high-level, a technical doc for the team implies detailed — match it. (3) Otherwise default to medium. (4) If the chosen level produces too many elements for the topology, aggregate entities into groups rather than changing level or topology.
- Layers/Steps: each level with name, description, and accent color. For left-to-right topology, count the steps and apply the step count scaling table from
references/topology-layouts.md to set step max-width and arrow width accordingly
- Nodes: each box with emoji, name, and metadata density matching the detail level above
- Connections: what each arrow represents (label density matches detail level)
- Special Components: callout boxes, badges, info panels (reduce or skip for high-level)
- Legend Entries: one per accent color used
Step 1.5 — Choose the Theme
If the user specifies a theme, use it. Otherwise default to dark.
| Theme |
Best for |
Keywords |
dark (default) |
Technical diagrams, dev docs |
"dark", default |
light |
Presentations, documentation sites |
"light", "chiaro", "presentation" |
corporate |
Business plans, pitch decks |
"corporate", "business", "professional" |
neon |
Creative, gaming, social media |
"neon", "cyberpunk", "vibrant" |
minimal |
Clean docs, technical specs |
"minimal", "clean", "simple" |
See references/themes.md for the exact :root values and overrides per theme.
Step 2 — Build the HTML
Read the reference files for detailed CSS/layout specifications:
references/typography-and-colors.md — fonts, palette, background
references/themes.md — theme system with 5 color schemes
references/topology-layouts.md — layout rules for each of the 8 topologies
references/components.md — node cards, badges, callouts, legend, animations
references/safety-rules.md — mandatory layout constraints for all topologies
references/canvas.md — infinite canvas with pan & zoom (Miro-like navigation)
Follow every rule in those references exactly. The design system is battle-tested — don't improvise fonts, colors, or layout patterns.
Always include the infinite canvas system from references/canvas.md. This lets users pan (click+drag) and zoom (scroll wheel) the diagram freely, like a whiteboard.
Step 3 — Output
- Single
.html file, all CSS in <style>, all JS in <script>
- No external dependencies except Google Fonts via
@import
- No CSS frameworks, no JS libraries (vanilla JS for hub-and-spoke coordinates and canvas pan/zoom)
- Valid HTML5 with
<!DOCTYPE html> as first line
- Must render correctly opened directly in a browser
- Responsive down to 360px viewport width
Save as diagram-[topic-slug].html in the current working directory. Open it in the browser with open (macOS) or xdg-open (Linux). Tell the user where it was saved.
1---2name: diagram-creator3description: Generate beautiful, production-ready architecture diagrams as self-contained HTML files from any input. Use this skill whenever the user wants to create a diagram, schema, flowchart, network diagram, system visualization, timeline, org chart, or any visual representation of concepts — technical or non-technical. Trigger when the user mentions "diagram", "schema", "architecture", "flow", "topology", "pipeline", "timeline", "visualize", "graph", or asks to turn a file into a visual diagram. Accepts ANY file type as input (.md, .txt, .json, .yaml, .csv, .pdf, .py, .ts, .toml, .env, .tf, .dockerfile, etc.) — Claude auto-detects the format and extracts relevant structure to diagram. Even a simple sentence like "diagram of how OAuth works" or "visualize this file" triggers this skill.4---56# Diagram Creator78Generate stunning, self-contained HTML diagrams with professional typography, smooth animations, and an infinite canvas you can pan and zoom like Miro. Output is always a single `.html` file that opens directly in any browser — zero dependencies. Supports 5 themes and 8 topology layouts.910## Input Handling1112Accept any of these inputs and auto-process them:1314| Input type | How to handle |15|---|---|16| **Topic/description** | "Docker networking", "OAuth 2.0 flow" — use directly |17| **Markdown** (.md, .mdx) | Extract structure from headings, lists, tables, relationships |18| **JSON / YAML** (.json, .yaml, .yml, .jsonl) | Parse structure — keys become nodes, nesting becomes layers |19| **Code files** (.py, .ts, .js, .go, .rs, .java, .rb, .php, .swift, .kt, .c, .cpp, .cs, .scala, etc.) | Extract classes, functions, imports, inheritance — diagram the architecture |20| **Config / Infra** (.toml, .ini, .env, .tf, .hcl, Dockerfile, docker-compose.yml, Makefile, nginx.conf) | Map services, variables, dependencies, infrastructure |21| **API specs** (.openapi.yaml, .swagger.json, .graphql, .proto) | Extract endpoints, types, service relationships |22| **Database schemas** (.sql, .prisma, .dbml) | Map tables, columns, foreign keys, relationships |23| **CI/CD pipelines** (.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile) | Visualize pipeline stages and deployment flows |24| **Data files** (.csv, .tsv) | Identify columns as entities, rows as relationships |25| **Microsoft Office** (.xlsx, .xls, .docx, .doc, .pptx, .ppt) | Extract tables, headings, slide structure, org charts, SmartArt |26| **Package manifests** (package.json, requirements.txt, Cargo.toml, go.mod, pom.xml) | Map dependency trees |27| **Existing diagrams** (.drawio, .puml, .mermaid) | Read spec and re-render with this design system |28| **PDF / Docs** (.pdf, .txt, .rst, .adoc) | Read content, extract core structure |29| **Notebooks** (.ipynb) | Extract code cells, data flow, library dependencies |3031**If it's a file, this skill can diagram it.** For formats not listed, read the content and extract whatever structure exists.3233When receiving a file path, read the file, detect the extension, and intelligently extract what matters for the diagram. Don't ask the user to reformat — figure it out.3435If the input is genuinely ambiguous (no clear structure to extract), ask clarifying questions before proceeding. See "Pre-generation Questions" below.3637## Pre-generation Questions3839Always ask these questions before generating, unless the answer is completely obvious from the input. **Ask one question at a time** — wait for the user's answer before moving to the next. Present every question as a **numbered list** so the user can simply reply with a number.4041Skip a question ONLY when the answer is unambiguous — e.g., "diagram of Docker bridge networking" makes topology (nested) and detail level (medium) obvious. When in doubt, ask.4243**Question flow (one at a time, in this order):**44451. **What to visualize?** (skip only if input is already specific)46 Present 2-3 interpretations of the input as numbered options, plus an "Other" option. Tailor the options to what the user actually asked — don't use generic placeholders.47 ```48 What do you want to visualize?49 1) [interpretation A]50 2) [interpretation B]51 3) Other — describe below52 → Reply with the number:53 ```54552. **Layout?** (skip if only one topology realistically fits — choose automatically in Step 0)56 Only list the 2-3 topologies that could realistically fit, not all 8. Adapt options based on the previous answer.57 ```58 Layout?59 1) Left-to-right — sequential flow60 2) Timeline — vertical step sequence61 → Reply with the number:62 ```63643. **Detail level?**65 ```66 Detail level?67 1) High-level — main entities only, understand in 5 seconds68 2) Medium — entities with key info, labeled connections (default)69 3) Detailed — full technical breakdown, all metadata70 → Reply with the number (default: 2):71 ```72734. **Theme?**74 ```75 Theme?76 1) Dark (default)77 2) Light78 3) Corporate79 4) Neon80 5) Minimal81 → Reply with the number (default: 1):82 ```8384Once you have all the answers, proceed autonomously through all remaining steps without further questions.8586## Step 0 — Choose the Topology8788Pick exactly one topology based on what fits the content best:8990| Topology | When to use | Examples |91|---|---|---|92| `nested` | Hierarchical containment, layers wrapping layers | Docker networking, K8s pods, OSI model, VPC subnets |93| `left-to-right` | Sequential flow from A to Z | OAuth flow, CI/CD pipeline, user journey, request lifecycle |94| `hub-and-spoke` | Central node connected to N surrounding nodes | API gateway, microservices, load balancer, team structure |95| `timeline` | Ordered vertical sequence of events/steps | Deploy pipeline, project roadmap, historical events |96| `grid` | Matrix/table comparison, feature grids | Feature comparison, skill map, competitive landscape |97| `tree` | Hierarchical branching, org charts | Org chart, file tree, decision tree, taxonomy |98| `funnel` | Progressive narrowing, conversion stages | Sales funnel, data pipeline, filtering process |99| `comparison` | Side-by-side 2-3 options | Product vs product, technology choices, before/after |100101## Step 1 — Plan the Content102103Before writing HTML, plan these elements in your thinking:104105- **Topic**: one sentence describing what the diagram shows106- **Detail level**: choose one of three levels. Default to **medium** unless context suggests otherwise:107 - **High-level** — Only the main entities of the system. Aggregate similar entities into single boxes (e.g., "Backend Services" instead of listing 10 microservices). No metadata in boxes — just name and role. Minimal connection labels. No callouts, badges, or notes. The viewer should understand the structure in 5 seconds.108 - **Medium** (default) — The entities needed to understand how the system works, without sub-components. Each box gets 1-2 metadata relevant to the domain (infra: port and protocol; org chart: role and team; flow: input/output of each step). Label connections where it adds clarity. Callouts only for non-obvious key concepts. The viewer who knows the domain should understand the diagram without further explanation.109 - **Detailed** — Everything: sub-components, configurations, technical notes. All relevant metadata per box (ports, protocols, versions, env vars, states). Badges, explanatory callouts, side notes. Goal: complete technical reference for people working on the system.110 How to choose: (1) If the user specifies a level explicitly, use it. (2) If context clarifies intent — a presentation implies high-level, a technical doc for the team implies detailed — match it. (3) Otherwise default to medium. (4) If the chosen level produces too many elements for the topology, aggregate entities into groups rather than changing level or topology.111- **Layers/Steps**: each level with name, description, and accent color. For left-to-right topology, count the steps and apply the step count scaling table from `references/topology-layouts.md` to set step max-width and arrow width accordingly112- **Nodes**: each box with emoji, name, and metadata density matching the detail level above113- **Connections**: what each arrow represents (label density matches detail level)114- **Special Components**: callout boxes, badges, info panels (reduce or skip for high-level)115- **Legend Entries**: one per accent color used116117## Step 1.5 — Choose the Theme118119If the user specifies a theme, use it. Otherwise default to **dark**.120121| Theme | Best for | Keywords |122|---|---|---|123| `dark` (default) | Technical diagrams, dev docs | "dark", default |124| `light` | Presentations, documentation sites | "light", "chiaro", "presentation" |125| `corporate` | Business plans, pitch decks | "corporate", "business", "professional" |126| `neon` | Creative, gaming, social media | "neon", "cyberpunk", "vibrant" |127| `minimal` | Clean docs, technical specs | "minimal", "clean", "simple" |128129See `references/themes.md` for the exact `:root` values and overrides per theme.130131## Step 2 — Build the HTML132133Read the reference files for detailed CSS/layout specifications:134135- `references/typography-and-colors.md` — fonts, palette, background136- `references/themes.md` — theme system with 5 color schemes137- `references/topology-layouts.md` — layout rules for each of the 8 topologies138- `references/components.md` — node cards, badges, callouts, legend, animations139- `references/safety-rules.md` — mandatory layout constraints for all topologies140- `references/canvas.md` — infinite canvas with pan & zoom (Miro-like navigation)141142Follow every rule in those references exactly. The design system is battle-tested — don't improvise fonts, colors, or layout patterns.143144**Always include the infinite canvas system** from `references/canvas.md`. This lets users pan (click+drag) and zoom (scroll wheel) the diagram freely, like a whiteboard.145146## Step 3 — Output147148- Single `.html` file, all CSS in `<style>`, all JS in `<script>`149- No external dependencies except Google Fonts via `@import`150- No CSS frameworks, no JS libraries (vanilla JS for hub-and-spoke coordinates and canvas pan/zoom)151- Valid HTML5 with `<!DOCTYPE html>` as first line152- Must render correctly opened directly in a browser153- Responsive down to 360px viewport width154155Save as `diagram-[topic-slug].html` in the current working directory. Open it in the browser with `open` (macOS) or `xdg-open` (Linux). Tell the user where it was saved.