agentleFS
SumonMSelimSumonMSelim/skills/aws-architecture-diagram/SKILL.md

aws-architecture-diagram

Skill1 starsChanged 25 days agoMITView on GitHub

Generate an accurate AWS system architecture diagram (SVG + render HTML + PNG) for any codebase that deploys to AWS, in the official AWS reference-architecture style with official AWS icons. Use when the user asks for an architecture / system design / infrastructure diagram of an AWS project, or to update an existing one. Read IaC (Terraform, CDK, CloudFormation, SAM) and application code first so every box and arrow is real.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use clean_labels=True in Diagram(...) to fail fast when label overlap cannot be resolved.

    line 35
  2. Very specific:

    Follow reference/accuracy.md.

    line 40
  3. Distinctive:

    Follow code over docs when they disagree, and say so.

    line 43
  4. Distinctive:

    Do not include instance sizes, node counts, memory, CIDRs, retention or other capacity details unless the user asks.

    line 45
  5. Very specific:

    Follow reference/style.md.

    line 49
  6. Very specific:

    Create a spec in the project's scratch location (or docs/ if the user wants it versioned).

    line 55
  7. Very specific:

    Add new icons with Diagram(..., extra_icons={"key": "Arch_..._64.svg"}).

    line 61

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AWS Architecture Diagram

Produce a diagram that an engineer can trust: every component traces to infrastructure code, every arrow names the real call. Output is an editable SVG, a 2x PNG, and render.html for deterministic screenshot rendering. Generation prefers Docker and falls back to local Python automatically.

Files in this skill:

  • scripts/awsdiag.py drawing library (icons, groups, arrows, badges, legend) and icon lookup CLI
  • scripts/gen.sh run a spec (Docker first, local Python fallback)
  • scripts/render.sh SVG → PNG via headless Chrome (zenika/alpine-chrome:124) + Pillow crop
  • reference/accuracy.md how to audit the codebase before drawing (read this first)
  • reference/style.md layout grid, label rules, collision checklist
  • reference/icons.md icon pack download, naming, lookup

Prerequisites

  • Docker (recommended).
  • Python 3 (fallback path if Docker unavailable).
  • Official AWS Architecture Icons (SVG asset package): https://aws.amazon.com/architecture/icons/ pack can be bundled under this skill folder (icons/, etc.) or provided via AWS_ICONS=/path/to/unzipped/package.

Theme and readability controls

  • Themes:
    • standard-light
    • standard-dark
    • hand-drawn-light
    • hand-drawn-dark
  • Set via Diagram(..., theme="...") or THEME=... scripts/gen.sh ....
  • Use clean_labels=True in Diagram(...) to fail fast when label overlap cannot be resolved.

Workflow

1. Audit the source of truth (do not skip)

Follow reference/accuracy.md. Read IaC, then application code, then CI workflows, then docs. Build a component inventory: resource → purpose → in/out edges with the concrete API action or path pattern. Ask the user which environment/stack is the target if there is more than one. Follow code over docs when they disagree, and say so.

Do not include instance sizes, node counts, memory, CIDRs, retention or other capacity details unless the user asks. Components, roles, and communication only.

2. Plan the layout

Follow reference/style.md. Decide canvas size, the scenario order for numbered badges (e.g. 1–4 user request, 5–6 async processing, 7 deploy), which services go in the platform strip, and where third parties sit (outside the AWS Cloud box). Sketch coordinates on a 20 px grid before writing code.

3. Write the spec

Create a spec in the project's scratch location (or docs/ if the user wants it versioned). Unknown icon name → look it up:

python scripts/awsdiag.py icons "<keyword>"
python scripts/awsdiag.py themes

Add new icons with Diagram(..., extra_icons={"key": "Arch_..._64.svg"}).

4. Generate and render

scripts/gen.sh <spec.py> <out_dir>
scripts/render.sh <out_dir> architecture <W> <H>

Outputs architecture.svg, architecture.render.html, architecture.png (2x).

5. Review the PNG, then fix

Open the PNG and run the collision checklist in reference/style.md: overlapping labels, labels outside the panel, legend clipped, crossing lines without jumps. Fix coordinates and re-render. One or two passes is normal.

6. Final accuracy pass

Re-read the IaC once more and tick every component and arrow against the render. Tell the user about any deliberate simplification (an omitted edge, merged tables) so nothing is silently made up.

7. Deliver

Copy architecture.png and architecture.svg to where the user wants them (commonly docs/). Do not commit unless asked.

Conventions baked into the library

  • Palette: AWS squid ink text, slate arrows, rust flow badges, white panel on light grey.
  • Solid arrow = synchronous request. Dashed = asynchronous or control plane.
  • Rust mono labels on arrows carry the real API action or path pattern.
  • Group colours follow the AWS icon pack (Region teal, VPC purple, private subnet blue, public subnet green, account pink).
  • Platform strip on the right for shared services (KMS, CloudWatch, X-Ray, ACM, SNS…); no arrows into it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.