agentleFS
roughboy99roughboy99/aiautobase-claude-skills/skills/python-diagrams/SKILL.md

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

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
  1. Very specific:

    Always save to a .py file and run it — the diagram renders automatically to PNG.

    line 17
  2. Distinctive:

    Write the Python diagram script

    line 84

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 graphviz

Basic 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 >> storage

Self-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] >> cache

Kubernetes

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 >> pods

Workflow

  1. Write the Python diagram script
  2. Run: python diagram.py
  3. The PNG is automatically saved and opened
  4. Iterate based on user feedback

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.