$npx -y skills add vidanov/aws-architecture-diagram-skill --skill aws-architecture-diagramGenerate AWS architecture diagrams in draw.io format. Activates when the user asks to create, generate, or build an architecture diagram, system diagram, or draw.io diagram for AWS services.
| 1 | ## Instructions |
| 2 | |
| 3 | Generate a draw.io (.drawio) XML file representing an AWS architecture diagram. |
| 4 | |
| 5 | ### Layout |
| 6 | - **Left-to-right flow** for data/request path |
| 7 | - **UI/Frontend on the LEFT** (users access from left side) |
| 8 | - **Data sources / external systems on the RIGHT** |
| 9 | - Use horizontal lanes for parallel paths (top lane, bottom lane) |
| 10 | - **Minimum 220px horizontal spacing** between icons (to leave room for edge labels) |
| 11 | - **Minimum 250px vertical spacing** between lanes (so vertical edges don't crowd) |
| 12 | - Secondary/auxiliary services (monitoring, DLQ, error paths) go BELOW the main flow with 280px+ vertical gap |
| 13 | |
| 14 | ### Canvas |
| 15 | - Large canvas: `pageWidth="2400" pageHeight="1400"` minimum |
| 16 | - Set `dx="2800" dy="1600"` for proper viewport |
| 17 | - Always include a title block as the first element after the background: |
| 18 | ```xml |
| 19 | <mxCell value="<b>Diagram Title</b><br>Author | Date | Version" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=14;spacing=8;" vertex="1" parent="1"> |
| 20 | <mxGeometry x="40" y="30" width="420" height="60" as="geometry" /> |
| 21 | </mxCell> |
| 22 | ``` |
| 23 | |
| 24 | ### Icon Style |
| 25 | - Icons are from draw.io's built-in `mxgraph.aws4` stencil library — the **official AWS Architecture Icons** (https://aws.amazon.com/architecture/icons/, updated quarterly) |
| 26 | - Icon size: **78x78px** for main services, **65x65px** for secondary |
| 27 | - Use `sketch=0` on all icons |
| 28 | - Use `strokeColor=#ffffff` on all AWS service icons |
| 29 | - Font size: **12px** for labels |
| 30 | |
| 31 | ### Edge Style — CRITICAL FOR CLEAN DIAGRAMS |
| 32 | |
| 33 | **Base edge style (all edges):** |
| 34 | ``` |
| 35 | edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; |
| 36 | ``` |
| 37 | |
| 38 | **Rules for edge labels:** |
| 39 | - Keep labels SHORT (1-2 words max). Use icon labels for detail, not edge labels. |
| 40 | - On horizontal edges: position label ABOVE the line using `verticalAlign=bottom;` in the edge style |
| 41 | - On vertical edges: position label to the LEFT using `align=right;` in the edge style |
| 42 | - Always add `labelBackgroundColor=#F5F5F5;` so labels don't overlap lines |
| 43 | - For edges WITHOUT labels: omit the `value` attribute entirely (don't use `value=""`) |
| 44 | |
| 45 | **Edge label positioning (prevents overlap with icons):** |
| 46 | ```xml |
| 47 | <mxCell value="Label" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;labelBackgroundColor=#F5F5F5;fontSize=11;" edge="1" source="a" target="b" parent="1"> |
| 48 | <mxGeometry relative="1" as="geometry" /> |
| 49 | </mxCell> |
| 50 | ``` |
| 51 | |
| 52 | **For edges that go to services ABOVE or BELOW the main flow:** |
| 53 | - Use explicit exit/entry points to control routing: |
| 54 | - Exit bottom: `exitX=0.5;exitY=1;exitDx=0;exitDy=0;` |
| 55 | - Enter top: `entryX=0.5;entryY=0;entryDx=0;entryDy=0;` |
| 56 | - Exit top: `exitX=0.5;exitY=0;exitDx=0;exitDy=0;` |
| 57 | - Enter bottom: `entryX=0.5;entryY=1;entryDx=0;entryDy=0;` |
| 58 | - This prevents draw.io from routing lines through other icons |
| 59 | |
| 60 | **Edge types:** |
| 61 | - Solid black (`strokeWidth=2`): primary data flow |
| 62 | - Dashed black (`strokeWidth=2;dashed=1;`): optional/async path |
| 63 | - Dashed red (`strokeWidth=2;dashed=1;strokeColor=#DD344C;`): error path |
| 64 | |
| 65 | **When NOT to label edges:** |
| 66 | - If the flow is obvious from context (e.g., Lambda → DynamoDB doesn't need "Write") |
| 67 | - If the icon labels already explain the relationship |
| 68 | - Prefer fewer, more meaningful labels over labeling every edge |
| 69 | |
| 70 | ### Two Icon Patterns — CRITICAL |
| 71 | |
| 72 | **Pattern 1: Service-level (resourceIcon frame)** |
| 73 | - Style: `shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.<name>` |
| 74 | - **MUST use `strokeColor=#ffffff`** — without it, the white glyph disappears |
| 75 | - Size: 78x78 |
| 76 | |
| 77 | **Pattern 2: Resource-level (standalone shape)** |
| 78 | - Style: `shape=mxgraph.aws4.<name>` directly (no resIcon) |
| 79 | - **MUST use `strokeColor=none`** — using #ffffff breaks these |
| 80 | - Size: 78x78 or 48x48 |
| 81 | |
| 82 | **Confusing these patterns guarantees broken icons.** |
| 83 | |
| 84 | ### Icon Reference Files (load by category as needed) |
| 85 | - `references/aws-icons-compute.md` — Lambda, EC2, ECS, EKS, Fargate |
| 86 | - `references/aws-icons-database.md` — DynamoDB, RDS, Aurora, ElastiCache |
| 87 | - `references/aws-icons-integration.md` — API Gateway, SQS, SNS, EventBridge, Step Functions |
| 88 | - `references/aws-icons-networking.md` — CloudFront, Route 53, VPC, ELB |
| 89 | - `references/aws-icons-storage.md` — S3, EFS, EBS, Glacier, Backup |
| 90 | - `references/aws-icons-security.md` — IAM, Cognito, KMS, WAF, Shield |
| 91 | - `references/aws-icons-analytics-ml.md` — Kinesis, Athena, Bedrock, SageMaker |
| 92 | - `references/aws-icons-common.md` — Groups, general resources, edge styles, base template |
| 93 | |
| 94 | **Always look up icons from reference files. Never guess icon names.** |
| 95 | |
| 96 | ### Group Boundaries |
| 97 | - **AWS Cloud:** `shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_aws_cloud_alt;strokeColor=#232F3E;fillColor=none` |
| 98 | - * |