architecture-diagram
Generate detailed layered architecture diagrams as self-contained HTML artifacts with inline SVG icons, CSS Grid nested container layout, SVG path connection overlays, and color-coded connection legends. Use when the user asks to create architecture diagrams, infrastructure diagrams, system topology diagrams, network diagrams, cloud architecture visuals, deployment diagrams, integration flow diagrams, or any request involving visual representation of system components, their containment hierarchy, and interconnections. Triggers on terms like "architecture diagram", "infra diagram", "system diagram", "topology", "deployment diagram", "network diagram", "integration architecture", or when the user provides a system description and asks for a visual/diagram.
NPX Install
npx skill4agent add mathews-tom/praxis-skills architecture-diagramTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Architecture Diagram Generator
.htmlWorkflow
- Parse user input → extract: components (with descriptions), containment hierarchy (zones/nesting), connections (with semantic types), and any provider context
- Read — select or create icons for each component
references/icons.md - Read — choose topology pattern, set grid-template-columns
references/layout-patterns.md - Read — define connection array with types, side-forcing, routing
references/connections.md - Start from — use its CSS/JS structure as the base
assets/template.html - Assemble the HTML:
- Set ,
{{DIAGRAM_TITLE}},{{BG_COLOR}}{{MAX_WIDTH}} - Populate — one entry per connection type used
{{LEGEND_ITEMS}} - Build zone hierarchy as nested
div.zone > span.zone-label + div.zone-content - Place nodes with , each containing:
data-node-id(inline SVG),.node-icon,.node-title.node-desc - Populate the JS array
connections - Apply provider theming if applicable
- Set
- Output final to the working directory or user-specified path
.html
Node construction
- Unique (semantic:
data-node-id,fusion-hcm, notedi-adaptor)node-7 - with inline SVG from the icon registry (or custom-generated following registry constraints)
.node-icon - — short name (1–3 words, bold)
.node-title - — extended description text (protocols, module lists, capabilities). Populate this whenever the user provides detail beyond just a name. This is critical for professional-quality diagrams.
.node-desc
Key structural invariants
- Every has exactly one
div.zoneand onespan.zone-labeldiv.zone-content - Every has explicit
div.zone-contentstyle="grid-template-columns: ..." - Zone depth class (to
zone-depth-0) matches actual nesting levelzone-depth-3 - All SVG icons are inline inside — no external image references
.node-icon - Connection overlay SVG with (arrow markers for each color) sits after the diagram div
<defs> - Connection renderer is last before
<script></body> - Legend div sits above the diagram div, containing only types actually used
Connection type selection
- (blue solid): REST, SOAP, API calls, synchronous requests, real-time data
realtime - (red dashed): SFTP, file transfers, EDI, scheduled batch jobs, bulk data
batch - (green solid): event-driven triggers, pub-sub, webhooks, callbacks, business events
event - (orange dashed): management plane, monitoring, config push, admin flows
control - (blue solid): when semantic type is ambiguous or only one flow type exists
default
defaultDesign defaults
- Background: (warm neutral) or
#f0ece4(cool blue-gray) — choose based on provider/context#e8eef5 - Zone borders: dashed, colored by depth (warm browns → reds)
- Icons: 44×44px, (or provider-specific)
--icon-color: #3a3a3a - Node title: 12px bold, node desc: 10.5px regular #555
- Connections: 2px stroke, curved by default
- Font: Segoe UI / system-ui stack
- Max-width: 1400px typical, increase for complex diagrams
Handling ambiguity
- Infer zone nesting from naming conventions (Region > VPC > Subnet, etc.)
- Default to connections and no legend if flow types are unspecified
default - Place management/observability services outside the main data-path zones
- Use generic icon set and warm-neutral background unless provider is specified
- Ask for clarification only when component list or topology is fundamentally ambiguous
Error Handling
| Problem | Cause | Fix |
|---|---|---|
| File deleted or skill directory incomplete | Regenerate from skill defaults: reconstruct the CSS/JS skeleton using the structure documented in this SKILL.md and the reference files |
Icon reference not found in | Component type not in the registry | Fall back to the generic box icon defined in |
| Connection lines overlap or route through nodes | Dense graph with auto-routing conflicts | Adjust zone layout: increase |
| Playwright render failure during HTML-to-image export | Chromium not installed or script error | Run |
| Zone nesting exceeds depth-3 styling | Architecture has more than 4 containment levels | Flatten by combining the deepest two levels into a single zone, or split into two separate diagrams linked by description |
References
- — 28+ SVG icon definitions, custom icon rules, provider color table
references/icons.md - — node structure, zone nesting, 5 topology patterns, interior grid guidance, sizing table
references/layout-patterns.md - — connection schema, 6 semantic types with colors, side-forcing, route modes, legend markup
references/connections.md - — complete HTML skeleton: CSS, legend, zone/node styles, marker defs for all colors, connection renderer JS with auto side-detection
assets/template.html