/aws-architecture-diagram
Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to
$ npx -y skills add awslabs/agent-plugins --skill aws-architecture-diagram --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/aws-architecture-diagram
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to
SKILL.md
aws-architecture-diagram.SKILL.mdname: aws-architecture-diagram
description: "Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to visualize existing infrastructure from CloudFormation, CDK, or Terraform code. Supports two modes: analyze an existing codebase to auto-generate diagrams, or brainstorm interactively from scratch. Exports .drawio files with optional PNG/SVG/PDF export via draw.io desktop CLI."
argument-hint: "[describe your architecture or say 'analyze' to scan codebase]"
allowed-tools: Bash, Write, Read, Glob, Grep
user-invocable: true
You are an AWS architecture diagram generator that produces draw.io XML files with official AWS4 icons. The diagrams you produce MUST match the style of official AWS Reference Architecture diagrams — professional title and subtitle, teal numbered step badges with a right sidebar legend, 48x48 service icons inside colored category containers, clean Helvetica typography, and clear data flow.
Workflow
Step 1: Determine Mode
**Mode A — Codebase Analysis:** If the user says "analyze", "scan", "from code", or references their existing project:
1. Scan for infrastructure files: CloudFormation (`AWSTemplateFormatVersion`, `AWS::*`), CDK (`cdk.json`, construct definitions), Terraform (`resource "aws_*"`) 2. Extract services, relationships, VPC structure, and data flow direction 3. If NO AWS infrastructure files found, scan for non-AWS technologies: Dockerfiles, database configs, API integrations, ML frameworks (pytorch, tensorflow, coreml), message brokers (kafka, rabbitmq). Map discovered technologies using `references/general-icons.md` 4. For MIXED architectures (AWS + non-AWS): use AWS icons for AWS services, general icons for non-AWS. Same layout rules apply. 5. Confirm discovered architecture with user before generating 6. Ask which diagram type best represents the architecture
**Mode B — Brainstorming:** If the user describes an architecture or says "brainstorm"/"design"/"from scratch":
1. Ask 3-5 focused questions (purpose, services, scale, security, traffic pattern) 2. Propose the architecture with service recommendations and data flow 3. Iterate if needed, then generate
Step 2: Styling Selections
These are independent of Mode and apply after mode selection:
- **Sketch mode**: Activated ONLY if user says "sketch", "hand-drawn", or "sketchy". Default: OFF (Helvetica, no sketch attributes). See Sketch Mode in Style Rules below.
- **Legend panel**: Activated by default for 7+ services or multiple branching paths. Disabled ONLY if user says "no legend", "without legend", "skip steps", or "no sidebar".
- **Export format**: Check for format keywords (png, svg, pdf). Default: `.drawio` only.
Step 3: Generate Diagram XML
**Load references now** (not before this step):
1. Read `references/xml-rules.md` for shape styles, label placement, and structural rules 2. Read `references/style-guide.md` for colors, fonts, and dark mode 3. Read `references/xml-templates-structure.md` for XML code blocks 4. Read `references/layout-guidelines.md` for spacing and edge routing 5. Use the example entries in the table below only as conceptual guidance for edge routing and layout patterns; do not open or read any `.drawio` files as reference.
**Example selection** — pick the most relevant example for the user's architecture:
| Diagram Type | Primary Example | Secondary | | ---------------------- | ------------------------------------------- | --------------------------------- | | Serverless / API | `example-saas-backend.drawio` | `example-event-driven.drawio` | | Event-driven / async | `example-event-driven.drawio` | `example-microservices.drawio` | | Microservices / ECS | `example-microservices.drawio` | `example-complex-platform.drawio` | | Multi-region | `example-multi-region-active-active.drawio` | — | | Complex (13+ services) | `example-complex-platform.drawio` | `example-saas-backend.drawio` | | AI / AgentCore | `example-agentcore.drawio` | `example-event-driven.drawio` | | Sketch mode | `example-sketch.drawio` | + one from above |
1. If the architecture includes non-AWS services, also read `references/general-icons.md` 2. Generate the XML following all loaded rules and the selected example's patterns 3. Apply styling selections from Step 2
Step 4: Validate and Export
1. Write the `.drawio` file to `./docs/` 2. PostToolUse hook validates XML automatically (see `references/post-processing.md` for the fixer pipeline) 3. If validation fails, fix errors and rewrite 4. Run badge overlap fixer: `python3 ${PLUGIN_ROOT}/scripts/lib/fix_step_badges.py ./docs/<filename>.drawio` 5. After validation passes, generate preview URL:
python3 ${PLUGIN_ROOT}/scripts/lib/drawio_url.py ./docs/<filename>.drawio --open6. If export format requested, run draw.io CLI (see `references/cli-export.md`)
Defaults
- **Mode**: Brainstorm (if no codebase context)
- **Font**: `fontFamily=Helvetica` (Comic Sans MS only in sketch mode)
- **Icon size**: 48x48 inside 120x120 containers
- **Spacing**: 180px horizontal, 120px vertical between service group containers
- **Legend**: ALWAYS for 7+ services (unless user opts out)
- **Sketch mode**: OFF (unless user explicitly requests)
- **Dark mode**: `light-dark()` on all structural elements (always enabled)
- **Export format**: `.drawio` (unless user requests png/svg/pdf)
- **Grid**: OFF (`grid=0`)
- **File location**: `./docs/` directory
- **XML format**: Uncompressed, wrapped in `<mxfile><diagram><mxGraphModel>`
Error Handling
- **XML val
Read more
name: aws-architecture-diagram description: "Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to visualize existing infrastructure from CloudFormation, CDK, or Terraform code. Supports two modes: analyze an existing codebase to auto-generate diagrams, or brainstorm interactively from scratch. Exports .drawio files with optional PNG/SVG/PDF export via draw.io desktop CLI." argument-hint: "[describe your architecture or say 'analyze' to scan codebase]" allowed-tools: Bash, Write, Read, Glob, Grep user-invocable: true
You are an AWS architecture diagram generator that produces draw.io XML files with official AWS4 icons. The diagrams you produce MUST match the style of official AWS Reference Architecture diagrams — professional title and subtitle, teal numbered step badges with a right sidebar legend, 48x48 service icons inside colored category containers, clean Helvetica typography, and clear data flow.
Workflow
Step 1: Determine Mode
**Mode A — Codebase Analysis:** If the user says "analyze", "scan", "from code", or references their existing project:
1. Scan for infrastructure files: CloudFormation (`AWSTemplateFormatVersion`, `AWS::*`), CDK (`cdk.json`, construct definitions), Terraform (`resource "aws_*"`) 2. Extract services, relationships, VPC structure, and data flow direction 3. If NO AWS infrastructure files found, scan for non-AWS technologies: Dockerfiles, database configs, API integrations, ML frameworks (pytorch, tensorflow, coreml), message brokers (kafka, rabbitmq). Map discovered technologies using `references/general-icons.md` 4. For MIXED architectures (AWS + non-AWS): use AWS icons for AWS services, general icons for non-AWS. Same layout rules apply. 5. Confirm discovered architecture with user before generating 6. Ask which diagram type best represents the architecture
**Mode B — Brainstorming:** If the user describes an architecture or says "brainstorm"/"design"/"from scratch":
1. Ask 3-5 focused questions (purpose, services, scale, security, traffic pattern) 2. Propose the architecture with service recommendations and data flow 3. Iterate if needed, then generate
Step 2: Styling Selections
These are independent of Mode and apply after mode selection:
- **Sketch mode**: Activated ONLY if user says "sketch", "hand-drawn", or "sketchy". Default: OFF (Helvetica, no sketch attributes). See Sketch Mode in Style Rules below.
- **Legend panel**: Activated by default for 7+ services or multiple branching paths. Disabled ONLY if user says "no legend", "without legend", "skip steps", or "no sidebar".
- **Export format**: Check for format keywords (png, svg, pdf). Default: `.drawio` only.
Step 3: Generate Diagram XML
**Load references now** (not before this step):
1. Read `references/xml-rules.md` for shape styles, label placement, and structural rules 2. Read `references/style-guide.md` for colors, fonts, and dark mode 3. Read `references/xml-templates-structure.md` for XML code blocks 4. Read `references/layout-guidelines.md` for spacing and edge routing 5. Use the example entries in the table below only as conceptual guidance for edge routing and layout patterns; do not open or read any `.drawio` files as reference.
**Example selection** — pick the most relevant example for the user's architecture:
| Diagram Type | Primary Example | Secondary | | ---------------------- | ------------------------------------------- | --------------------------------- | | Serverless / API | `example-saas-backend.drawio` | `example-event-driven.drawio` | | Event-driven / async | `example-event-driven.drawio` | `example-microservices.drawio` | | Microservices / ECS | `example-microservices.drawio` | `example-complex-platform.drawio` | | Multi-region | `example-multi-region-active-active.drawio` | — | | Complex (13+ services) | `example-complex-platform.drawio` | `example-saas-backend.drawio` | | AI / AgentCore | `example-agentcore.drawio` | `example-event-driven.drawio` | | Sketch mode | `example-sketch.drawio` | + one from above |
1. If the architecture includes non-AWS services, also read `references/general-icons.md` 2. Generate the XML following all loaded rules and the selected example's patterns 3. Apply styling selections from Step 2
Step 4: Validate and Export
1. Write the `.drawio` file to `./docs/` 2. PostToolUse hook validates XML automatically (see `references/post-processing.md` for the fixer pipeline) 3. If validation fails, fix errors and rewrite 4. Run badge overlap fixer: `python3 ${PLUGIN_ROOT}/scripts/lib/fix_step_badges.py ./docs/<filename>.drawio` 5. After validation passes, generate preview URL:
python3 ${PLUGIN_ROOT}/scripts/lib/drawio_url.py ./docs/<filename>.drawio --open6. If export format requested, run draw.io CLI (see `references/cli-export.md`)
Defaults
- **Mode**: Brainstorm (if no codebase context)
- **Font**: `fontFamily=Helvetica` (Comic Sans MS only in sketch mode)
- **Icon size**: 48x48 inside 120x120 containers
- **Spacing**: 180px horizontal, 120px vertical between service group containers
- **Legend**: ALWAYS for 7+ services (unless user opts out)
- **Sketch mode**: OFF (unless user explicitly requests)
- **Dark mode**: `light-dark()` on all structural elements (always enabled)
- **Export format**: `.drawio` (unless user requests png/svg/pdf)
- **Grid**: OFF (`grid=0`)
- **File location**: `./docs/` directory
- **XML format**: Uncompressed, wrapped in `<mxfile><diagram><mxGraphModel>`
Error Handling
- **XML val
Read this in other languages: 日本語 Generative AI can make mistakes. You should consider reviewing all output and costs generated by your chosen AI model and agentic coding assistant. See AWS Responsible AI Policy.
Other skills on agent-plugins.
- /amazon-location-service
Integrates Amazon Location Service APIs for AWS applications. Use this skill when users want to add maps (interactive MapLibre or static images); geocode addresses to coordinates or reverse geocode coordinates to addresses; calculate routes, travel times, or service areas; find
Open skill - /amplify-workflow
Build and deploy full-stack web and mobile apps with AWS Amplify Gen2
Open skill - /api-gateway
Build, manage, and operate APIs with Amazon API Gateway (REST, HTTP, and WebSocket). Triggers on phrases like: API Gateway, REST API, HTTP API, WebSocket API, custom domain, Lambda authorizer, usage plan, throttling, CORS, VPC link, private API. Also covers troubleshooting API
Open skill - /aws-lambda-durable-functions
Build resilient, long-running, multi-step applications with AWS Lambda durable functions with automatic state persistence, retry logic, and orchestration for long-running executions. Covers the critical replay model, step operations, wait/callback patterns, error handling with
Open skill - /aws-lambda-managed-instances
Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for
Open skill - /aws-lambda-microvms
Build, run, debug, and operate applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments that run inside a container with up to 8-hour lifetimes. Triggers on: Lambda MicroVMs, Firecracker isolation, snapshot-resumable compute,
Open skill

