Architecture Diagram Skill
Generate professional, dark-themed technical architecture diagrams as standalone HTML files with inline SVG graphics. No external tools, no API keys, no rendering libraries — just write the HTML file and open it in a browser.
Based on Cocoon AI's architecture-diagram-generator (MIT).
Workflow
- User describes their system architecture (components, connections, technologies)
- Generate the HTML file following the design system below
- Save with
write_file to a .html file (e.g. ~/architecture-diagram.html)
- User opens in any browser — works offline, no dependencies
Output Location
Save diagrams to a user-specified path, or default to the current working directory:
./[project-name]-architecture.html
Preview
After saving, suggest the user open it:
# macOS
open ./my-architecture.html
# Linux
xdg-open ./my-architecture.html
Design System & Visual Language
Color Palette (Semantic Mapping)
Use specific rgba fills and hex strokes to categorize components:
| Component Type |
Fill (rgba) |
Stroke (Hex) |
| Frontend |
rgba(8, 51, 68, 0.4) |
#22d3ee (cyan-400) |
| Backend |
rgba(6, 78, 59, 0.4) |
#34d399 (emerald-400) |
| Database |
rgba(76, 29, 149, 0.4) |
#a78bfa (violet-400) |
| AWS/Cloud |
rgba(120, 53, 15, 0.3) |
#fbbf24 (amber-400) |
| Security |
rgba(136, 19, 55, 0.4) |
#fb7185 (rose-400) |
| Message Bus |
rgba(251, 146, 60, 0.3) |
#fb923c (orange-400) |
| External |
rgba(30, 41, 59, 0.5) |
#94a3b8 (slate-400) |
Typography & Background
- Font: JetBrains Mono (Monospace), loaded from Google Fonts
- Sizes: 12px (Names), 9px (Sublabels), 8px (Annotations), 7px (Tiny labels)
- Background: Slate-950 (
#020617) with a subtle 40px grid pattern
<!-- Background Grid Pattern -->
<pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
<path d="M 40 0 L 0 0 0 40" fill="none" stroke="#1e293b" stroke-width="0.5"/>
</pattern>
Technical Implementation Details
Component Rendering
Components are rounded rectangles (rx="6") with 1.5px strokes. To prevent arrows from showing through semi-transparent fills, use a double-rect masking technique:
- Draw an opaque background rect (
#0f172a)
- Draw the semi-transparent styled rect on top
Connection Rules
- Z-Order: Draw arrows early in the SVG (after the grid) so they render behind component boxes
- Arrowheads: Defined via SVG markers
- Security Flows: Use dashed lines in rose color (
#fb7185)
- Boundaries:
- Security Groups: Dashed (
4,4), rose color
- Regions: Large dashed (
8,4), amber color, rx="12"
Spacing & Layout Logic
- Standard Height: 60px (Services); 80-120px (Large components)
- Vertical Gap: Minimum 40px between components
- Message Buses: Must be placed in the gap between services, not overlapping them
- Legend Placement: CRITICAL. Must be placed outside all boundary boxes. Calculate the lowest Y-coordinate of all boundaries and place the legend at least 20px below it.
Document Structure
The generated HTML file follows a four-part layout:
- Header: Title with a pulsing dot indicator and subtitle
- Main SVG: The diagram contained within a rounded border card
- Summary Cards: A grid of three cards below the diagram for high-level details
- Footer: Minimal metadata
Info Card Pattern
<div class="card">
<div class="card-header">
<div class="card-dot cyan"></div>
<h3>Title</h3>
</div>
<ul>
<li>• Item one</li>
<li>• Item two</li>
</ul>
</div>
Output Requirements
- Single File: One self-contained
.html file
- No External Dependencies: All CSS and SVG must be inline (except Google Fonts)
- No JavaScript: Use pure CSS for any animations (like pulsing dots)
- Compatibility: Must render correctly in any modern web browser
Template Reference
Load the full HTML template for the exact structure, CSS, and SVG component examples:
skill_view(name="architecture-diagram", file_path="templates/template.html")
The template contains working examples of every component type (frontend, backend, database, cloud, security), arrow styles (standard, dashed, curved), security groups, region boundaries, and the legend — use it as your structural reference when generating diagrams.
1---2name: architecture-diagram3description: Generate professional dark-themed system architecture diagrams as standalone HTML/SVG files. Self-contained output with no external dependencies. Based on Cocoon AI's architecture-diagram-generator (MIT).4version: 1.0.05author: Cocoon AI (hello@cocoon-ai.com), ported by Hermes Agent6license: MIT7dependencies: []8metadata:9 hermes:10 tags: [architecture, diagrams, SVG, HTML, visualization, infrastructure, cloud]11 related_skills: [excalidraw]12---1314# Architecture Diagram Skill1516Generate professional, dark-themed technical architecture diagrams as standalone HTML files with inline SVG graphics. No external tools, no API keys, no rendering libraries — just write the HTML file and open it in a browser.1718Based on [Cocoon AI's architecture-diagram-generator](https://github.com/Cocoon-AI/architecture-diagram-generator) (MIT).1920## Workflow21221. User describes their system architecture (components, connections, technologies)232. Generate the HTML file following the design system below243. Save with `write_file` to a `.html` file (e.g. `~/architecture-diagram.html`)254. User opens in any browser — works offline, no dependencies2627### Output Location2829Save diagrams to a user-specified path, or default to the current working directory:30```31./[project-name]-architecture.html32```3334### Preview3536After saving, suggest the user open it:37```bash38# macOS39open ./my-architecture.html40# Linux41xdg-open ./my-architecture.html42```4344## Design System & Visual Language4546### Color Palette (Semantic Mapping)4748Use specific `rgba` fills and hex strokes to categorize components:4950| Component Type | Fill (rgba) | Stroke (Hex) |51| :--- | :--- | :--- |52| **Frontend** | `rgba(8, 51, 68, 0.4)` | `#22d3ee` (cyan-400) |53| **Backend** | `rgba(6, 78, 59, 0.4)` | `#34d399` (emerald-400) |54| **Database** | `rgba(76, 29, 149, 0.4)` | `#a78bfa` (violet-400) |55| **AWS/Cloud** | `rgba(120, 53, 15, 0.3)` | `#fbbf24` (amber-400) |56| **Security** | `rgba(136, 19, 55, 0.4)` | `#fb7185` (rose-400) |57| **Message Bus** | `rgba(251, 146, 60, 0.3)` | `#fb923c` (orange-400) |58| **External** | `rgba(30, 41, 59, 0.5)` | `#94a3b8` (slate-400) |5960### Typography & Background61- **Font:** JetBrains Mono (Monospace), loaded from Google Fonts62- **Sizes:** 12px (Names), 9px (Sublabels), 8px (Annotations), 7px (Tiny labels)63- **Background:** Slate-950 (`#020617`) with a subtle 40px grid pattern6465```svg66<!-- Background Grid Pattern -->67<pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">68 <path d="M 40 0 L 0 0 0 40" fill="none" stroke="#1e293b" stroke-width="0.5"/>69</pattern>70```7172## Technical Implementation Details7374### Component Rendering75Components are rounded rectangles (`rx="6"`) with 1.5px strokes. To prevent arrows from showing through semi-transparent fills, use a **double-rect masking technique**:761. Draw an opaque background rect (`#0f172a`)772. Draw the semi-transparent styled rect on top7879### Connection Rules80- **Z-Order:** Draw arrows *early* in the SVG (after the grid) so they render behind component boxes81- **Arrowheads:** Defined via SVG markers82- **Security Flows:** Use dashed lines in rose color (`#fb7185`)83- **Boundaries:**84 - *Security Groups:* Dashed (`4,4`), rose color85 - *Regions:* Large dashed (`8,4`), amber color, `rx="12"`8687### Spacing & Layout Logic88- **Standard Height:** 60px (Services); 80-120px (Large components)89- **Vertical Gap:** Minimum 40px between components90- **Message Buses:** Must be placed *in the gap* between services, not overlapping them91- **Legend Placement:** **CRITICAL.** Must be placed outside all boundary boxes. Calculate the lowest Y-coordinate of all boundaries and place the legend at least 20px below it.9293## Document Structure9495The generated HTML file follows a four-part layout:961. **Header:** Title with a pulsing dot indicator and subtitle972. **Main SVG:** The diagram contained within a rounded border card983. **Summary Cards:** A grid of three cards below the diagram for high-level details994. **Footer:** Minimal metadata100101### Info Card Pattern102```html103<div class="card">104 <div class="card-header">105 <div class="card-dot cyan"></div>106 <h3>Title</h3>107 </div>108 <ul>109 <li>• Item one</li>110 <li>• Item two</li>111 </ul>112</div>113```114115## Output Requirements116- **Single File:** One self-contained `.html` file117- **No External Dependencies:** All CSS and SVG must be inline (except Google Fonts)118- **No JavaScript:** Use pure CSS for any animations (like pulsing dots)119- **Compatibility:** Must render correctly in any modern web browser120121## Template Reference122123Load the full HTML template for the exact structure, CSS, and SVG component examples:124125```126skill_view(name="architecture-diagram", file_path="templates/template.html")127```128129The template contains working examples of every component type (frontend, backend, database, cloud, security), arrow styles (standard, dashed, curved), security groups, region boundaries, and the legend — use it as your structural reference when generating diagrams.