python-diagrams
Skill2 starsChanged 3 months agoMITView on GitHub
Generate cloud architecture diagrams using the Python diagrams library. Supports AWS, GCP, Azure, Kubernetes, on-prem, and custom nodes. Outputs PNG automatically via Graphviz.
- Installs packages
In this repository11 other files it gives its agents.
- directorSkill
- find-skillsSkill
- go-diagramsSkill
- json-canvasSkill
- markmapSkill
- mermaidSkill
- okthanksSkill
- plantumlSkill
- ssh-remote-connectionSkill
- txt2csvSkill
- write-a-skillSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Always save to a .py file and run it — the diagram renders automatically to PNG.
- Distinctive: line 84
Write the Python diagram script
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Diagrams Skill
You are an expert in the Python diagrams library for cloud and system architecture visualization.
Setup
pip install diagrams
# Also requires Graphviz: brew install graphviz / apt install graphvizBasic Usage
Always save to a .py file and run it — the diagram renders automatically to PNG.
Examples
AWS Architecture
from diagrams import Diagram, Cluster
from diagrams.aws.compute import EC2, Lambda
from diagrams.aws.database import RDS, ElastiCache
from diagrams.aws.network import CloudFront, Route53
from diagrams.aws.storage import S3
with Diagram("AI Creator OS — AWS Stack", show=True, direction="LR"):
dns = Route53("DNS")
cdn = CloudFront("CDN")
with Cluster("App"):
api = Lambda("API")
workers = [Lambda("Worker1"), Lambda("Worker2")]
db = RDS("Database")
cache = ElastiCache("Cache")
storage = S3("Media Storage")
dns >> cdn >> api >> workers
api >> db
api >> cache
workers >> storageSelf-Hosted Stack (Hector's setup)
from diagrams import Diagram, Cluster
from diagrams.onprem.container import Docker
from diagrams.onprem.database import PostgreSQL
from diagrams.onprem.inmemory import Redis
from diagrams.onprem.network import Nginx
from diagrams.onprem.workflow import Airflow
with Diagram("Orbix Self-Hosted Infrastructure", show=True):
with Cluster("Hostinger VPS (72.60.175.102)"):
proxy = Nginx("Cloudflare Tunnel")
with Cluster("Docker"):
n8n = Docker("n8n")
ghost = Docker("Ghost Blog")
trigger = Docker("Trigger.dev")
db = PostgreSQL("PostgreSQL")
cache = Redis("Redis")
proxy >> [n8n, ghost, trigger]
[n8n, trigger] >> db
[n8n, trigger] >> cacheKubernetes
from diagrams import Diagram
from diagrams.k8s.compute import Pod, Deployment
from diagrams.k8s.network import Service, Ingress
with Diagram("K8s Deployment", show=True):
ing = Ingress("Ingress")
svc = Service("Service")
deploy = Deployment("Deployment")
pods = [Pod("Pod 1"), Pod("Pod 2"), Pod("Pod 3")]
ing >> svc >> deploy >> podsWorkflow
- Write the Python diagram script
- Run:
python diagram.py - The PNG is automatically saved and opened
- Iterate based on user feedback
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

