agentleFS
jonathan-vellajonathan-vella/bmit-2026/.github/skills/python-diagrams/SKILL.md

python-diagrams

Skill3 starsChanged 8 months agoMITArchived repositoryView on GitHub

Python diagram generation: WAF/cost/compliance charts (matplotlib), architecture diagrams (diagrams library), ERDs, swimlanes, timelines, wireframes (graphviz). USE FOR: WAF bar charts, cost donut/projection charts, compliance gap charts, Python architecture diagrams, ERD diagrams, business process flows, timeline/Gantt charts, UI wireframes. DO NOT USE FOR: Draw.io architecture diagrams (use drawio), inline Mermaid (use mermaid), Excalidraw whiteboarding (use excalidraw).

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow this pattern for architecture diagram generation:

    line 67
  2. Very specific:

    Always set show=False to prevent auto-opening

    line 82
  3. Very specific:

    Use direction="TB" (top-to-bottom) for consistency

    line 83
  4. Very specific:

    DON'T: Use Mermaid for charts (use matplotlib) · Use Python diagrams for primary architecture diagrams (use Draw.io skill) · Let show=True …

    line 108
  5. Very specific:

    Use grouped list-to-list edge operators ([a, b] >> [c, d]) — use explicit node-to-node edges instead (the diagrams library may reject …

    line 111
  6. Distinctive:

    Does NOT: generate Draw.io architecture diagrams · produce Mermaid diagrams · generate Bicep/Terraform · create ADRs · deploy resources.

    line 118

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 & Charts

Skill for generating diagrams and charts using Python libraries: matplotlib for WAF/cost/compliance visualizations, diagrams for architecture diagrams, and graphviz for ERDs, swimlanes, timelines, and wireframes.

Prerequisites

pip install diagrams matplotlib pillow && apt-get install -y graphviz

Routing Guide

Diagram typeLibraryOutput
WAF bar chartsmatplotlib.py + .png
Cost donut / projection chartsmatplotlib.py + .png
Compliance gap chartsmatplotlib.py + .png
Architecture diagrams (non-Draw.io)diagrams.py + .png
Swimlane / business processgraphviz.py + .png
Entity-relationship diagramsgraphviz.py + .png
Timeline / Gantt chartsmatplotlib.py + .png
UI wireframesgraphviz.py + .png

Required Outputs (Workflow Integration)

StepPython chart files
202-waf-scores.py/.png
303-des-cost-distribution.py/.png, 03-des-cost-projection.py/.png
404-dependency-diagram.py/.png, 04-runtime-diagram.py/.png
707-ab-cost-*.py/.png, 07-ab-compliance-gaps.py/.png

Suffix rules: -des for design (Step 3), -ab for as-built (Step 7).

Execution

Save .py source in agent-output/{project}/, then run to produce .png:

python3 agent-output/{project}/03-des-cost-distribution.py

Chart Design Tokens

Background & grid: Background #F8F9FA · Grid #E0E0E0 · DPI 150.

Azure colors: Azure blue #0078D4 · Min line #DC3545 · Target line #28A745 · Trend #FF8C00.

WAF pillar colors: Security #C00000 · Reliability #107C10 · Performance #FF8C00 · Cost #FFB900 · Operational Excellence #8764B8.

Architecture Diagram Conventions (diagrams library)

Follow this pattern for architecture diagram generation:

"""Brief description of what the diagram shows."""

from diagrams import Cluster, Diagram
from diagrams.azure.compute import AppServices
from diagrams.azure.network import FrontDoors

with Diagram("Diagram Title", show=False, filename="output-name", direction="TB"):
    with Cluster("Resource Group"):
        # Resources...
        pass
  • Always set show=False to prevent auto-opening
  • Use direction="TB" (top-to-bottom) for consistency
  • Group resources in Cluster blocks matching Azure resource groups
  • Set explicit filename parameter to control output location

Professional Output Standards

Critical settings for clean output — use labelloc="t" to keep labels inside clusters:

node_attr = {"fontname": "Arial Bold", "fontsize": "11", "labelloc": "t"}
graph_attr = {"bgcolor": "white", "pad": "0.8", "nodesep": "0.9", "ranksep": "0.9",
              "splines": "spline", "fontname": "Arial Bold", "fontsize": "16", "dpi": "150"}
cluster_style = {"margin": "30", "fontname": "Arial Bold", "fontsize": "14"}

Requirements: labelloc='t' · Arial Bold fonts · full resource names from IaC · dpi="150"+ · margin="30"+ · CIDR blocks in VNet/Subnet labels.

Guardrails

DO: Set show=False · Use direction="TB" · Group in Cluster blocks · Set explicit filename · Use DPI ≥150 · Apply design tokens consistently · Generate WAF scores PNG when WAF scores are assigned.

DON'T: Use Mermaid for charts (use matplotlib) · Use Python diagrams for primary architecture diagrams (use Draw.io skill) · Let show=True open a viewer · Omit filename (produces non-deterministic output names) · Use grouped list-to-list edge operators ([a, b] >> [c, d]) — use explicit node-to-node edges instead (the diagrams library may reject grouped expressions with a TypeError) · Use emoji or Unicode glyphs in chart labels — keep labels ASCII-safe for portability across container fonts.

Scope Exclusions

Does NOT: generate Draw.io architecture diagrams · produce Mermaid diagrams · generate Bicep/Terraform · create ADRs · deploy resources.

Scripts

scripts/generate_diagram.py (interactive diagram generation) · scripts/multi_diagram_generator.py (multi-type: process, ERD, timeline, wireframe) · scripts/ascii_to_diagram.py (ASCII art → diagram conversion) · scripts/verify_installation.py (prerequisites check)

Reference Index

FileContent
references/python-charts.mdChart execution, design tokens, output standards
references/waf-cost-charts.mdWAF pillar bar, cost donut & projection chart implementations
references/azure-components.mdComplete list of 700+ Azure diagram components
references/common-patterns.mdReady-to-use Python architecture patterns (3-tier, hub-spoke, etc.)
references/business-process-flows.mdWorkflow and swimlane diagram patterns
references/entity-relationship-diagrams.mdDatabase ERD patterns
references/integration-services.mdIntegration service diagram patterns
references/migration-patterns.mdMigration architecture patterns
references/sequence-auth-flows.mdAuthentication flow sequence patterns
references/timeline-gantt-diagrams.mdProject timeline and Gantt diagrams
references/ui-wireframe-diagrams.mdUI mockup and wireframe patterns
references/iac-to-diagram.mdGenerate diagrams from Bicep/Terraform/ARM templates

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.