architecture-diagram

Generate polished dark-themed architecture diagrams as self-contained HTML, exportable to image or PDF.

architecture-diagram (Cocoon) generates dark-theme architecture diagrams as self-contained HTML, exportable to image or PDF. It doesn't validate the architecture.

Design & slidesagents 2MIT downloadable Scan upstream repo ↗

Upstream:Cocoon-AI/architecture-diagram-generator · ★ 7665 · last commit 2026-05-13 (199d)

What it is

Turns system, infrastructure, cloud, security or network topologies into dark-themed architecture diagrams: one self-contained HTML file with inline SVG and CSS that opens in a browser. For people who must hand over an architecture diagram without installing a drawing tool; the topology still comes from the user.

Core workflow

StageContent
TriggerA request for a system, infrastructure, cloud, security or network topology diagram
InputSystem components and their connections; the template at resources/template.html; a default viewBox of 1000x680
StepsColour components by semantic type, draw arrows early (SVG paints in document order), add an opaque rect under semi-transparent fills to mask arrows, stack at 60px height with 40px or more gaps, place the legend outside every boundary at least 20px below the lowest one, then fill three summary cards and the footer
OutputOne self-contained HTML file whose ... toolbar copies a high-DPI PNG, downloads a PNG and exports a one-page PDF
BoundaryNo live topology; export needs html2canvas 1.4.1 and jspdf 2.5.2 from a CDN; clipboard needs a user gesture and a secure context

Getting started: copy the template, change the title and viewBox, swap components one at a time, then align spacing and legend last.

Traits

  • Fixed semantic palette: cyan frontend, emerald backend, violet database, amber cloud, rose security, orange message bus
  • The spacing section documents a counter-example: a message bus belongs centred in the 40px gap at y=140, not pressed against the next component
  • It warns that foreignObject renders inconsistently in html2canvas and restricts shapes to plain SVG and <text>, while CDN scripts carry SRI hashes

Who it is for and who it is not for

Good fitPoor fit
A dark diagram that can be sent to a colleague as-isEditable drawio or Visio source files
Cloud, security and network topologies with region boundariesFully offline environments

How it differs

NeedUse
Multi-page diagrams inside a decknextlevelbuilder-ui-ux-pro-max-skill-slides
Poster or cover-style visual piecesanthropics-skills-canvas-design
One theme applied to documents and slidesanthropics-skills-theme-factory

Source-level risks

RiskSourceImpact
html2canvas and jsPDF load from the jsdelivr CDNThe two script tags in Export ToolbarExport fails without network or when the CDN is unreachable
SRI hashes are hardcodedSame sectionA version bump without a fresh hash is refused by the browser
Clipboard API restrictionsCaveatsCopying the image fails outside https or localhost
Layout is hand-written SVG coordinates with no validation scriptSpacing RulesMore components mean more manual maths, and overlaps caught only by eye

Example: input and output

Input

Draw the scheduling system architecture: web, API, database, notifications.

Output

Writes self-contained HTML: components, data-flow arrows, deployment boundaries, exportable.

Check: arrows match real call direction.

FAQ

Can I edit the output?

Yes — edit the HTML or regenerate.

Is it suitable for formal docs?

Yes, but check font sizes before export.

Does it include cloud icons?

Mostly generic shapes.

CategoryDesign & slides
Version2026-05-13
Agent supportClaude Code, Generic (reads SKILL.md)
OSmacOS / Linux / Windows
Dependenciesnone
Environmentnone
Scriptsnone
LicenseMIT
SourceCocoon-AI/architecture-diagram-generator ↗
Verification✓ verified
Get itDownload zip
SHA256: 3f6319a78f55aaf9e8019c61d37596e96af165f603243a5546862ccca568fde8 · 0.0 MB

"Generic (agents that read SKILL.md)" means any agent that discovers and loads SKILL.md; support level (auto-discovery, manual config, script execution) varies by agent.

Install
unzip cocoon-ai-architecture-diagram-generator-architecture-diagram-2026-05-13.zip -d ~/.claude/skills/

Skills directory example: ~/.claude/skills/ for Claude Code; other agents use wherever SKILL.md is discovered.