From architecture-diagram
Generate professional architecture diagrams from system descriptions. Creates single-file HTML with inline SVG that can be opened in any browser. Use this skill whenever the user asks to create, draw, or generate: architecture diagrams, system diagrams, infrastructure diagrams, layered architecture, component diagrams, platform capability maps, process architecture, microservice architecture, system design diagrams, architecture visualization, tech stack diagrams, flowchart, flow chart, decision tree, process flow, mind map, mindmap, brainstorm, concept map, ER diagram, entity relationship, database schema, data model, sequence diagram, interaction diagram, message flow, API flow, protocol flow, 分层架构图, 系统架构图, 架构图, 流程图, 思维导图, ER图, 序列图, 时序图, or wants to visualize how a system works. Supports 5 diagram types and 6 visual styles: dark-professional, hand-drawn, light-corporate, cyberpunk-neon, blueprint, warm-cozy. Supports 4 output formats: html, svg, mermaid, png/pdf (via export script).
How this skill is triggered — by the user, by Claude, or both
Slash command
/architecture-diagram:architecture-diagramThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate publication-quality diagrams as standalone files. The output can be:
README.mdassets/examples/ai-platform.jsonassets/examples/chrome-architecture.jsonassets/examples/er-blog.jsonassets/examples/er-ecommerce.jsonassets/examples/flowchart-ci-cd.jsonassets/examples/flowchart-user-auth.jsonassets/examples/images/chrome-architecture-review.pngassets/examples/images/chrome-architecture.htmlassets/examples/images/chrome-architecture.pngassets/examples/images/er-ecommerce-review.pngassets/examples/images/er-ecommerce.htmlassets/examples/images/er-ecommerce.pngassets/examples/images/flowchart-user-auth-review.pngassets/examples/images/flowchart-user-auth.htmlassets/examples/images/flowchart-user-auth.pngassets/examples/images/mindmap-product-review.pngassets/examples/images/mindmap-product.htmlassets/examples/images/mindmap-product.pngassets/examples/images/sequence-order-review.pngGenerate publication-quality diagrams as standalone files. The output can be:
.html file with inline SVG and embedded CSS (default, no JavaScript).svg filescripts/export.shWhen the user describes a system, determine the diagram type:
| User Intent | Diagram Type | Reference File |
|---|---|---|
| System layers, tiers, services, infrastructure, platform | architecture | references/diagram-architecture.md |
| Process flow, decision tree, algorithm, branching logic | flowchart | references/diagram-flowchart.md |
| Brainstorm, topic hierarchy, feature tree, learning roadmap | mindmap | references/diagram-mindmap.md |
| Database tables, entities, relationships, data model | er | references/diagram-er.md |
| Message flow, API calls, protocol, interaction between actors | sequence | references/diagram-sequence.md |
If unsure, default to architecture. Read the diagram-type-registry at references/diagram-type-registry.md for detailed trigger keywords.
ALWAYS follow these two steps in order. Never skip to output directly.
Read the user's description and extract structure into the JSON schema for the selected diagram type. Each type has its own schema file in assets/:
| Diagram Type | Schema File |
|---|---|
architecture | assets/schema-architecture.json |
flowchart | assets/schema-flowchart.json |
mindmap | assets/schema-mindmap.json |
er | assets/schema-er.json |
sequence | assets/schema-sequence.json |
Key rules across all types:
id (kebab-case)type values as defined in each schemadark-professionalhtml"icon" field (see references/icons-catalog.md)Output the JSON first, then proceed to Step 2.
Read the diagram-type reference file for generation instructions:
Choose template: Based on the style field, read the corresponding style reference and template:
dark-professional → references/style-dark-professional.md → assets/template-dark.htmlhand-drawn → references/style-hand-drawn.md → assets/template-sketch.htmllight-corporate → references/style-light-corporate.md → assets/template-light-corporate.htmlcyberpunk-neon → references/style-cyberpunk-neon.md → assets/template-cyberpunk-neon.htmlblueprint → references/style-blueprint.md → assets/template-blueprint.htmlwarm-cozy → references/style-warm-cozy.md → assets/template-warm-cozy.htmlCompute layout: Follow the coordinate calculation rules in the diagram-type-specific layout file.
Build SVG: Use the component SVG snippets from the diagram-type-specific components file.
Wrap in HTML (if format=html): Use the corresponding template file as the starting structure.
For other formats:
references/output-svg.md — extract standalone SVGreferences/output-mermaid.md — transform JSON to Mermaid textscripts/export.sh (see references/output-png-pdf.md)<, >, &, ", ' in all labels, titles, and descriptions before inserting into SVG/HTML to prevent XSS| Situation | Recommended style |
|---|---|
| Technical article, documentation | dark-professional |
| Presentation, slide deck | dark-professional |
| Whiteboard/teaching context | hand-drawn |
| Blog post with casual tone | hand-drawn |
| Enterprise architecture review | light-corporate |
| Stakeholder/business presentation | light-corporate |
| Developer tool, CLI product | cyberpunk-neon |
| Futuristic/tech-forward content | cyberpunk-neon |
| Engineering spec, technical drawing | blueprint |
| Infrastructure/SRE documentation | blueprint |
| Educational content, tutorial | warm-cozy |
| Non-technical audience, friendly docs | warm-cozy |
After generating the initial diagram, the user may request changes:
Before delivering, verify:
<foreignObject> has xmlns="http://www.w3.org/1999/xhtml" on the root HTML element.module, .type-X, .module-label)<text> (connection labels only) has text-anchor="middle" dominant-baseline="central"layer_y[i] = layer_y[i-1] + h + gapCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub zeroz-lab/gmdiagram