skills/cloud-diagrams/SKILL.md
Generate cloud architecture diagrams as code (AWS, GCP, Azure, K8s)
npx skillsauth add jcsaaddupuy/badrobots cloud-diagramsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create cloud system architecture diagrams as code using the mingrammer/diagrams Python library with Graphviz.
brew install graphviz # macOS
# apt-get install graphviz # Linux
# simple.py
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
with Diagram("Web Service", show=False):
ELB("lb") >> EC2("web") >> RDS("db")
# Run with
uvx --with diagrams python simple.py
with Diagram("Title",
direction="LR", # LR, RL, TB, BT
filename="out", # output filename
show=False, # don't auto-open
outformat="png"): # png, svg, pdf
# ... add nodes and edges
from diagrams.aws.compute import EC2, Lambda
from diagrams.aws.database import RDS
from diagrams.gcp.compute import GCE
from diagrams.k8s.compute import Pod
web = EC2("web-server")
func = Lambda("processor")
db = RDS("database")
# Linear flow
lb >> web >> db
# Fan-out
lb >> [web1, web2, web3] >> db
# Undirected
node1 - node2
from diagrams import Edge
web >> Edge(label="HTTPS", color="red", style="dashed") >> db
from diagrams import Cluster
with Cluster("Web Tier"):
web = [EC2("web1"), EC2("web2")]
with Cluster("Database"):
db_primary = RDS("primary")
db_primary - RDS("replica")
web >> db_primary
from diagrams import Diagram, Cluster
from diagrams.aws.network import ELB, Route53
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
with Diagram("Layered", show=False, direction="TB"):
dns = Route53("dns")
lb = ELB("lb")
with Cluster("App"):
web = [EC2("web1"), EC2("web2")]
with Cluster("Database"):
db = RDS("primary")
dns >> lb >> web >> db
with Diagram("Workers", show=False):
queue = SQS("queue")
workers = [Lambda(f"worker{i}") for i in range(1, 4)]
db = RDS("db")
queue >> workers >> db
from diagrams import Diagram, Cluster
from diagrams.aws.compute import EC2
from diagrams.gcp.storage import GCS
with Diagram("Hybrid", show=False):
with Cluster("AWS"):
app = EC2("app")
with Cluster("GCP"):
storage = GCS("backup")
app >> storage
| Provider | Import | Examples |
|----------|--------|----------|
| AWS | diagrams.aws.* | EC2, S3, Lambda, RDS, ELB |
| GCP | diagrams.gcp.* | GCE, BigQuery, GCS |
| Azure | diagrams.azure.* | VM, Functions, CosmosDB |
| Kubernetes | diagrams.k8s.* | Pod, Service, Deployment |
| On-Premise | diagrams.onprem.* | Server, PostgreSQL, Nginx |
| Alibaba | diagrams.alibabacloud.* | ECS, RDS |
| Oracle | diagrams.oci.* | Compute, Database |
| SaaS | diagrams.saas.* | Auth0, Datadog |
See mingrammer/diagrams docs for full catalog.
RDS("users-db-prod") not RDS("db")Edge(label="...") for clarity| Problem | Solution |
|---------|----------|
| Graphviz not found | Run brew install graphviz |
| Module not found | Use uvx --with diagrams python |
| Crowded diagram | Break into multiple diagrams or use clusters |
| Custom icon error | Check file path exists and is relative to script |
from diagrams import Cluster, Diagram, Edge
from diagrams.aws.compute import EC2, Lambda
from diagrams.aws.database import RDS, ElastiCache
from diagrams.aws.network import ELB, Route53
from diagrams.aws.integration import SQS
from diagrams.aws.storage import S3
with Diagram("E-Commerce", direction="LR", show=False):
dns = Route53("DNS")
lb = ELB("LB")
with Cluster("Web"):
web = [EC2("web1"), EC2("web2")]
with Cluster("Data"):
cache = ElastiCache("Redis")
db_primary = RDS("primary")
db_primary - RDS("replica")
with Cluster("Workers"):
queue = SQS("queue")
workers = [Lambda("w1"), Lambda("w2")]
assets = S3("assets")
dns >> lb >> web
web >> cache
web >> db_primary
web >> Edge(label="jobs") >> queue >> workers >> db_primary
web >> assets
uvx --with diagrams python my_diagram.py
uvx --with diagrams --with requests python my_diagram.py
uvx --python 3.12 --with diagrams python my_diagram.py
development
DuckDB patterns for JSON/JSONL analysis, array unnesting, and common gotchas. Use when querying JSON files, nested data, or encountering "UNNEST not supported here" errors.
development
Mealie recipe manager API: recipes, shopping lists, meal plans. Requires MEALIE_BASE_URL and MEALIE_API_KEY.
business
TimeWarrior time tracking: start/stop intervals, query durations by tag or issue, compute totals for issue tracker time reporting
development
Bookmark manager for saving, searching, and annotating web content. Use when: (1) saving a webpage for later reference, (2) searching previously saved bookmarks, (3) adding highlights/annotations to saved content, (4) user asks to 'bookmark this' or 'save this article'. Requires READECK_BASE_URL and READECK_API_KEY environment variables.