/arch-diagram:arch-diagramfrom arch-diagram
Draw Lucidchart/AWS-style architecture diagrams (nested accounts/VPC/subnet tiers, official AWS/K8s/CNCF/vendor logos, edge-attached orthogonal arrows, numbered flows, optional animated connectors) and export SVG, PNG, animated GIF or editable draw.io XML; can also recreate a diagram from a reference image.
Ships in arch-diagram. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Absolute-layout architecture diagrams that look hand-made in Lucidchart: nested accounts, VPCs, subnet
tiers and namespaces; official service/product logos; arrows that attach to group edges with explicit
orthogonal routes; numbered steps with a legend; optional animated connectors. Output any of
<name>.svg (animated with SMIL when flows are on), .png, .gif (animated), .drawio (editable
diagrams.net XML) plus the generator <name>.py (the editable source).
Everything lives next to this file:
| Path | Purpose |
|---|---|
scripts/archdiag.py | the library (Canvas, helpers, CLI: grid, compare, crop, find) |
scripts/fetch_logos.py | downloads 24 brand logos missing from the diagrams icon set into logos/ |
scripts/install_fonts.py | JetBrains Mono for Vietnamese monospace text |
scripts/setup.sh | pip deps + logos + fonts in one go |
examples/*.py | verified diagrams to copy patterns from (previews in assets/previews/) |
diagrams / MermaidAuto-layout engines end arrows at node centres, pick their own routes and won't place a box "below" in an LR graph. When connection points matter, every box, icon and arrow point must be explicit.
bash <skill>/scripts/setup.sh, then work in a fresh folder with
sys.path.insert(0, "<skill>/scripts") (examples show the exact header). Graphviz is NOT needed.python3 archdiag.py grid ref.png grid.png 50 2590 and read
coordinates from the grid labels, never from the downscaled preview.
No reference: sketch columns (stages) × rows first; canvas 2600–4500 wide.python3 archdiag.py find <keyword>; brand logos: logo("<name>") (see list below)elbow via_x / via_y / points), colour<name>.py. Keep one shared row Y per flow so horizontal arrows are perfectly straight.python3 archdiag.py crop out.png c.png x1 y1 x2 y2 on every dense areapython3 archdiag.py compare ref.png out.png cmp.png.py (zip with logos/ if the
script uses logo()). Mention that .drawio opens in diagrams.net / the draw.io desktop or VS Code
extension, and that animated SVG plays in browsers but not in most slide tools (use the GIF there).c = Canvas(2900, 1800, flow="dash", cycle=2.0) # every connector animated (marching dashes)
c.arrow(a, b, flow="dot") # this one: a dot travelling along the line
c.arrow(a, b, flow=False) # this one static
c.save("out", "svg", "png", "gif", "drawio") # any subset; default ("svg", "png")
c.save_gif("out", fps=15, scale=0.5) # GIF size/smoothness knobs
flow="dash": the line itself becomes dashes that move toward the arrowhead. Good for "traffic flows".flow="dot": line stays as drawn, a dot (arrow colour) runs along it. Good for highlighting 1–3 key paths;
don't animate everything with dots.cycle, so the GIF loops seamlessly.round(cycle*fps) frames at
scale (0.5 keeps a 2900 px canvas around 1–3 MB; lower scale/fps if it gets big).flowAnimation=1 when animated), composite glyphs
(AWS tab, badge, Terraform mark, markers) → one SVG image each. Uncompressed XML, so it diffs in git.viewer-static.min.js from jgraph/drawio) in headless Chromium and compare to the PNG.a.right(Y) → b.left(Y); vertical: a.bottom(x) → b.top(x).
A group box is a valid endpoint — prefer it when the arrow "enters a zone".c.elbow(src.right(Y), tN.left(yN), via_x=X) with the same X.(icon.cx, icon.y2 + 48)), not at icon.bottom().a→b and b→a) or two parallel arrows 16 px apart.line pipeline, ink cross-account / provisioning / AWS API, accent + dashed optional/backup,
custom hex for a flow family (secrets blue dashed, telemetry orange, hybrid teal, KMS red dashed).Canvas)box() outer/dashed/solid/grey/dotted with tab="aws" · card() rounded custom box ·
tier(x1,y1,x2,y2, public, label) subnet band (green public / blue private) · pill() VPC endpoint row
returning its centre y (align target icons to it for straight arrows) · chip() ownership badge
(e.g. Terraform vs Argo CD) · marker(x,y,n) numbered step placed on a line · tab_label() label on a
dashed border · placeholder() dashed tile when no official logo exists · icon_c() icon by centre ·
mono() monospace text (CRDs, CIDRs, config keys).
diagrams ships AWS/Azure/GCP/K8s/on-prem icons. fetch_logos.py adds: sonatype (Nexus), coverity,
blackduck, cosign, kyverno, tetragon, keycloak, gateway-api, cilium, karpenter, keda, nvidia, alloy,
agentgateway, modelcontextprotocol, vllm, langgraph, openai, anthropic, claude, langchain, crewai, jira,
confluence. New logo: add one line to SOURCES (simple-icons slug, @iconify-json/logos key, or raw URL from
the project's own repo / cncf/artwork). Order of search: diagrams → simple-icons → iconify logos →
project repo → CNCF artwork.
Never fake a brand mark (no look-alike drawing, no other product's logo). If none is obtainable
(known: Seeker IAST, Bottlerocket) use placeholder() or plain text and tell the user.
Dark logos on dark backgrounds: put them on a light rounded tile.
eks_private_dependencies.py): one row per concern → component → VPC endpoint → AWS service → KMS usage; arrows are all horizontal.eks_platform_blueprint.py, hybrid_landing_zone.py): Network / Platform /
Observability accounts; public · private-ingress · private-mgmt · private-app · private-data tiers;
regional-services column aligned with endpoint pills.ai_gateway_hybrid.py): policy chain → listeners → backends with ordered trunks;
separate inference cluster and on-prem branch reached in a lower row.aws_aft_animated.py): flow="dash" everywhere, one flow="dot" entry path, exports all
four formats.slide_dark_zones.py): dark background, grid, zone cards — use when the user wants to
match a presentation, not an AWS diagram.tab_label(); keep text ≥ 8 px from lines)size or wrap to 2 lines)install_fonts.py), use Inter / JetBrains Monoc.under.append('<rect…/>') is fine — the draw.io converter parses the final SVG — but wrap a
multi-element glyph in c._group(x, y, w, h, parts) so it exports as one imageCanvas ≥ 2590 wide; icons 56–85 px with ≤ 2-line labels (15–23 px); group labels 18–21 px; AWS tabs 60 px.
Override colours: Canvas(w, h, theme={"accent": "#...", "badge": "#..."}), or pass hex to color=.
assets/previews/ai_gateway_hybrid.png (opens in a new tab)assets/previews/aws_aft_animated.gif (opens in a new tab)assets/previews/aws_aft_reference.png (opens in a new tab)assets/previews/eks_platform_blueprint.png (opens in a new tab)assets/previews/eks_private_dependencies.png (opens in a new tab)assets/previews/hybrid_landing_zone.png (opens in a new tab)assets/previews/slide_dark_zones.png (opens in a new tab)examples/ai_gateway_hybrid.py (opens in a new tab)examples/aws_aft_animated.drawio (opens in a new tab)examples/aws_aft_animated.py (opens in a new tab)examples/aws_aft_reference.py (opens in a new tab)examples/eks_platform_blueprint.py (opens in a new tab)examples/eks_private_dependencies.py (opens in a new tab)examples/hybrid_landing_zone.py (opens in a new tab)examples/slide_dark_zones.py (opens in a new tab)scripts/archdiag.py (opens in a new tab)scripts/fetch_logos.py (opens in a new tab)scripts/install_fonts.py (opens in a new tab)scripts/setup.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub vanlongme/skills --plugin arch-diagram