CtrlK
BlogDocsLog inGet started
Tessl Logo

python-diagrams

**UTILITY SKILL** — Python diagram generation: WAF/cost/compliance charts (matplotlib), architecture diagrams (diagrams lib), ERDs, swimlanes, timelines, wireframes (graphviz). WHEN: 'WAF bar chart', 'cost donut chart', 'compliance gap chart', 'Python architecture diagram', 'ERD diagram', 'swimlane', 'UI wireframe'. DO NOT USE FOR: Draw.io architecture diagrams (drawio), inline Mermaid (mermaid).

66

Quality

78%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./.github/skills/python-diagrams/SKILL.md
SKILL.md
Quality
Evals
Security

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

Every Python diagram emits both PNG and SVG siblings via the shared scripts/diagram_io.py helper — PNG for raster preview, SVG for scalable / accessible / diff-friendly review.

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

Required Outputs (Workflow Integration)

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

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

Execution & Output Standards

Save .py source in agent-output/{project}/, then run with python3 to produce the .png + .svg sibling pair. Every generator must import the shared helpers from scripts/diagram_io.py (save_figure, diagram_kwargs, render_graphviz) — never call plt.savefig, Diagram(outformat=...), or dot.render() directly.

For the full conventions — design tokens (Azure blue, WAF pillar colours, DPI 150), graph_attr / node_attr / cluster_style settings, labelloc='t', Arial Bold fonts, CIDR labels — read references/python-charts.md.

For ready-to-use architecture diagram patterns (3-tier web app, hub-spoke, etc.) including the canonical with Diagram(... show=False, direction="TB") as d: template, read references/common-patterns.md.

Rules

DO: Import save_figure / diagram_kwargs / render_graphviz from scripts/diagram_io.py so every chart emits both .png and .svg siblings · Set show=False · Use direction="TB" · Group in Cluster blocks · Set explicit filename · Use DPI ≥150 · Apply design tokens consistently · Generate WAF scores PNG+SVG when WAF scores are assigned.

DON'T: Call plt.savefig(...), Diagram(..., outformat=...), or dot.render(...) directly — always go through diagram_io · 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/diagram_io.py (shared PNG+SVG output helper — import this from every generator) · 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
Repository
jonathan-vella/azure-agentic-infraops
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.