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
2 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/hve-squadtheir own version, first seen Nov 29, 2026
- roughboy99/aiautobase-claude-skillstheir own version, first seen Aug 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- microsoft/hve-squad★ 26same name
- roughboy99/aiautobase-claude-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- appinsights-instrumentationSkill
- azure-adrSkill
- azure-aigatewaySkill
- azure-aiSkill
- azure-artifactsSkill
- azure-bicep-patternsSkill
- azure-cloud-migrateSkill
- azure-complianceSkill
- azure-computeSkill
- azure-cost-optimizationSkill
- azure-defaultsSkill
- azure-deploySkill
- azure-diagnosticsSkill
- azure-diagramsSkill
- azure-hosted-copilot-sdkSkill
- azure-kustoSkill
- azure-messagingSkill
- azure-prepareSkill
- azure-quotasSkill
- azure-rbacSkill
- azure-resource-lookupSkill
- azure-resource-visualizerSkill
- azure-storageSkill
- azure-validateSkill
- context-optimizerSkill
- context-shreddingSkill
- copilot-customizationSkill
- count-registrySkill
- docs-writerSkill
- drawioSkill
- entra-app-registrationSkill
- excalidrawSkill
- github-operationsSkill
- golden-principlesSkill
- iac-commonSkill
- make-skill-templateSkill
- mermaidSkill
- microsoft-code-referenceSkill
- microsoft-docsSkill
- microsoft-foundrySkill
- microsoft-skill-creatorSkill
- session-resumeSkill
- terraform-patternsSkill
- terraform-search-importSkill
- terraform-testSkill
- workflow-engineSkill
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
- Distinctive: line 67
Follow this pattern for architecture diagram generation:
- Very specific: line 82
Always set show=False to prevent auto-opening
- Very specific: line 83
Use direction="TB" (top-to-bottom) for consistency
- Very specific: line 108
DON'T: Use Mermaid for charts (use matplotlib) · Use Python diagrams for primary architecture diagrams (use Draw.io skill) · Let show=True …
- Very specific: line 111
Use grouped list-to-list edge operators ([a, b] >> [c, d]) — use explicit node-to-node edges instead (the diagrams library may reject …
- Distinctive: line 118
Does NOT: generate Draw.io architecture diagrams · produce Mermaid diagrams · generate Bicep/Terraform · create ADRs · deploy resources.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 & 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 graphvizRouting Guide
| Diagram type | Library | Output |
| WAF bar charts | matplotlib | .py + .png |
| Cost donut / projection charts | matplotlib | .py + .png |
| Compliance gap charts | matplotlib | .py + .png |
| Architecture diagrams (non-Draw.io) | diagrams | .py + .png |
| Swimlane / business process | graphviz | .py + .png |
| Entity-relationship diagrams | graphviz | .py + .png |
| Timeline / Gantt charts | matplotlib | .py + .png |
| UI wireframes | graphviz | .py + .png |
Required Outputs (Workflow Integration)
| Step | Python chart files |
| 2 | 02-waf-scores.py/.png |
| 3 | 03-des-cost-distribution.py/.png, 03-des-cost-projection.py/.png |
| 4 | 04-dependency-diagram.py/.png, 04-runtime-diagram.py/.png |
| 7 | 07-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.pyChart 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=Falseto prevent auto-opening - Use
direction="TB"(top-to-bottom) for consistency - Group resources in
Clusterblocks matching Azure resource groups - Set explicit
filenameparameter 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
| File | Content |
references/python-charts.md | Chart execution, design tokens, output standards |
references/waf-cost-charts.md | WAF pillar bar, cost donut & projection chart implementations |
references/azure-components.md | Complete list of 700+ Azure diagram components |
references/common-patterns.md | Ready-to-use Python architecture patterns (3-tier, hub-spoke, etc.) |
references/business-process-flows.md | Workflow and swimlane diagram patterns |
references/entity-relationship-diagrams.md | Database ERD patterns |
references/integration-services.md | Integration service diagram patterns |
references/migration-patterns.md | Migration architecture patterns |
references/sequence-auth-flows.md | Authentication flow sequence patterns |
references/timeline-gantt-diagrams.md | Project timeline and Gantt diagrams |
references/ui-wireframe-diagrams.md | UI mockup and wireframe patterns |
references/iac-to-diagram.md | Generate diagrams from Bicep/Terraform/ARM templates |
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.

