# AWS Architecture Diagram

Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon...

- Repository: https://github.com/awslabs/agent-plugins (933 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-10-15
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add awslabs/agent-plugins --skill aws-architecture-diagram -g -a claude-code -y`
Codex: `npx skills add awslabs/agent-plugins --skill aws-architecture-diagram -g -a codex -y`
Cursor: `npx skills add awslabs/agent-plugins --skill aws-architecture-diagram -g -a cursor -y`
Gemini CLI: `npx skills add awslabs/agent-plugins --skill aws-architecture-diagram -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add awslabs/agent-plugins`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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:

The rest: https://github.com/awslabs/agent-plugins/blob/HEAD/plugins/deploy-on-aws/skills/aws-architecture-diagram/SKILL.md
