From deploy-on-aws
Generates validated AWS architecture diagrams as draw.io XML using official AWS icons. Analyzes CloudFormation, CDK, Terraform codebases or brainstorms designs interactively. Exports .drawio with PNG/SVG/PDF options.
npx claudepluginhub awslabs/agent-plugins --plugin deploy-on-awsThis skill is limited to using the following tools:
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.
references/aws4-shapes-resources.mdreferences/aws4-shapes-services.mdreferences/cli-export.mdreferences/diagram-templates-advanced.mdreferences/diagram-templates-basic.mdreferences/example-agentcore.drawioreferences/example-complex-platform.drawioreferences/example-event-driven.drawioreferences/example-microservices.drawioreferences/example-multi-region-active-active.drawioreferences/example-saas-backend.drawioreferences/example-sketch.drawioreferences/general-icons.mdreferences/group-styles.mdreferences/layout-guidelines.mdreferences/post-processing.mdreferences/style-guide.mdreferences/xml-rules.mdreferences/xml-templates-examples.mdreferences/xml-templates-structure.mdGenerates AWS architecture diagrams as .drawio XML files using official AWS4 icons for VPC layouts, multi-tier apps, serverless designs with Lambda/EC2/RDS, and network topologies.
Generates Draw.io (.drawio) XML diagrams for architecture, flowcharts, sequence diagrams, ERDs, networks, and C4 models. Supports AWS icons for cloud architectures. Useful for visualizing systems and processes.
Maps network topologies, infrastructure architectures, and software systems in draw.io diagrams using AWS, Azure, GCP, Kubernetes, on-prem rack, and hybrid cloud shape libraries.
Share bugs, ideas, or general feedback.
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.
Mode A — Codebase Analysis: If the user says "analyze", "scan", "from code", or references their existing project:
AWSTemplateFormatVersion, AWS::*), CDK (cdk.json, construct definitions), Terraform (resource "aws_*")references/general-icons.mdMode B — Brainstorming: If the user describes an architecture or says "brainstorm"/"design"/"from scratch":
These are independent of Mode and apply after mode selection:
.drawio only.Load references now (not before this step):
references/xml-rules.md for shape styles, label placement, and structural rulesreferences/style-guide.md for colors, fonts, and dark modereferences/xml-templates-structure.md for XML code blocksreferences/layout-guidelines.md for spacing and edge routing.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 |
references/general-icons.mdWrite the .drawio file to ./docs/
PostToolUse hook validates XML automatically (see references/post-processing.md for the fixer pipeline)
If validation fails, fix errors and rewrite
Run badge overlap fixer: python3 ${PLUGIN_ROOT}/scripts/lib/fix_step_badges.py ./docs/<filename>.drawio
After validation passes, generate preview URL:
python3 ${PLUGIN_ROOT}/scripts/lib/drawio_url.py ./docs/<filename>.drawio --open
If export format requested, run draw.io CLI (see references/cli-export.md)
fontFamily=Helvetica (Comic Sans MS only in sketch mode)light-dark() on all structural elements (always enabled).drawio (unless user requests png/svg/pdf)grid=0)./docs/ directory<mxfile><diagram><mxGraphModel>references/aws4-shapes-services.md for valid mxgraph.aws4.* names.drawio file only, skip export, inform user to install draw.io desktopsource= and target= IDs reference existing mxCell elements-- is illegal inside <!-- --> per XML spec; use single hyphens or rephrase&, <, >, " in attribute valuesFull style details in references/style-guide.md. Critical rules that MUST be followed:
fontFamily=Helvetica; (Comic Sans MS only in sketch mode)light-dark() fills with fillStyle=auto;. See style-guide.md for the full color table.container=0 (decoration-only). Services use parent="aws-cloud" with absolute coords.strokeColor (VPC: #8C4FFF, Public subnet: #248814, Private subnet: #147EBA, Region: #00A4A6). NEVER use fontColor=#AAB7B8.resIcon=mxgraph.aws4.bedrock_agentcore (NOT mxgraph.aws4.bedrock)sketch=1;curveFitting=1;jiggle=2 to non-icon elements. Keep sketch=0 on service icons.references/general-icons.md. Same 120x120 container + 48x48 icon pattern. Apply category tint colors by functional role (database, compute, etc.). Labels are critical since icons are generic.See references/diagram-templates-basic.md and references/diagram-templates-advanced.md for layout patterns.
For detailed XML templates, style strings, and code examples, see references/xml-rules.md. Key structural rules:
Always use the full mxfile wrapper:
<mxfile host="Electron" version="29.6.1">
<diagram name="Page-1" id="diagram-1">
<mxGraphModel dx="1200" dy="800" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- All shapes and edges here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
id="0" is the root layer; cell id="1" is the default parent (both always required)parent="1" unless nested inside a containervpc-1, lambda-orders, s3-assets, edge-lambda-to-dynamomxgraph.aws4.* namespace. Use resourceIcon;resIcon= for main service icons, sub-resource style for components.value = category label (e.g., "DNS", "Compute"). Icon value = service name + optional italic sub-label. NEVER put the service name on the container.exitX/exitY and entryX/entryY (0-1) to control connection sides.connectable="0" and relative="1" geometry.container=0 (decoration-only). VPC/subnets use container=1.fillColor=#f5f5f5), placed BELOW title block at y >= 140.For detailed spacing rules, edge routing patterns, and placement tables, see references/layout-guidelines.md. Key rules:
orthogonalEdgeStyle. Add explicit waypoints for non-adjacent routing. Edges leave perpendicular to container face.#007CBD 28x28 badges near arrow sources. Right sidebar legend for 7+ services. Legend height MUST match diagram height.Each diagram gets a descriptive filename in kebab-case, placed in ./docs/ (e.g., docs/healthcare-appointment-agent.drawio, docs/3-tier-vpc-webapp.drawio). Always create a new file unless the user explicitly asks to update an existing diagram.
Create the docs/ directory if it does not exist
Derive the filename from the user's prompt (see File Naming above)
Always create new files unless the user explicitly asks to update an existing diagram
Save the diagram to ./docs/<descriptive-name>.drawio
After writing, the PostToolUse hook will automatically: a. Validate the XML (structure, AWS shapes, edges, geometry) b. If validation passes, generate a draw.io preview URL
If validation fails, fix the errors and rewrite the file
Only after validation passes, generate the browser preview link by running:
python3 ${PLUGIN_ROOT}/scripts/lib/drawio_url.py ./docs/<filename>.drawio --open
This compresses the XML and opens app.diagrams.net with the diagram loaded instantly. Do NOT run this if validation failed.
If the user requested an export format (png, svg, pdf):
a. Check if draw.io desktop CLI is available
b. Export with --embed-diagram to ./docs/<filename>.drawio.<format>
c. Delete the intermediate .drawio file on success
Always present to the user:
--) inside XML comments. -- is illegal inside <!-- --> per the XML spec and causes parse errors. Use single hyphens or rephrase.&, <, >, "id values for each mxCellreferences/aws4-shapes-services.md<mxfile><diagram><mxGraphModel> — not bare <mxGraphModel>resourceIcon;resIcon= style for main service iconscontainer=1;pointerEvents=0; on group shapesfontFamily=Helvetica; in every style attributevpc-1, lambda-orders, not cell-47)background attribute on mxGraphModel — any hardcoded background breaks dark mode adaptive contrastWhen generating diagrams, follow this priority order:
.drawio files in references/ (Step 3 selection table).drawio files ONLY when explicitly requested ("match my style", "update my diagram")Do NOT proactively read .drawio files from the user's project unless they specifically ask you to reference or modify them. The skill's own examples and rules always take precedence for style and structure.