agentsclimarketplace

Azure diagrams

Skill huqianghui/csa-ppt-plugin/skills/azure-diagrams

Comprehensive technical diagramming toolkit for solutions architects, presales, and developers. Creates Azure architecture diagrams (700+ official Microsoft icons), business process flows (swimlanes, workflows), ERD diagrams (database schemas), project timelines, UI wireframes, and network topology diagrams. Perfect for proposals, documentation, and architecture reviews. Also generates diagrams from Bicep, Terraform, and ARM templates. IMPORTANT - When creating PPT/presentations that include cloud architecture content (Azure, AWS, GCP), this skill MUST be used to generate architecture diagrams with official cloud provider icons. Output PNGs can be embedded directly into slides via the pptx skill.From its SKILL.md

Install
npx -y skills add huqianghui/csa-ppt-plugin --skill azure-diagrams

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

14.0 KB, as published. Nobody here has run it

Azure Architecture Diagrams Skill

A comprehensive technical diagramming toolkit for solutions architects, presales engineers, and developers. Generate professional diagrams for proposals, documentation, and architecture reviews.

⚡ Execution Method

Always execute diagram code inline - do not create a separate .py file:

python3 << 'EOF'
from diagrams import Diagram, Cluster
from diagrams.azure.compute import AKS
from diagrams.azure.database import CosmosDb

with Diagram("My Architecture", filename="outputs/{project}/diagrams/diagram", show=False):
    AKS("aks-prod") >> CosmosDb("cosmos-prod")

EOF

This approach:

  • ✅ Generates the diagram directly
  • ✅ No temporary .py files left on disk
  • ✅ Cleaner workflow

Do NOT do this:

# ❌ Don't create a file first
cat > diagram.py << 'EOF'
...
EOF
python3 diagram.py  # Leaves diagram.py behind

📊 Diagram Types

TypeReference FileExample Prompt
Azure Architecturereferences/azure-components.md"Design a microservices architecture with AKS and Cosmos DB"
Business Process Flowreferences/business-process-flows.md"Create a swimlane for invoice approval workflow"
Entity Relationship (ERD)references/entity-relationship-diagrams.md"Generate an ERD for customer and order entities"
Timeline / Ganttreferences/timeline-gantt-diagrams.md"Create a 6-month migration roadmap"
UI Wireframereferences/ui-wireframe-diagrams.md"Design a KPI dashboard layout"
Common Patternsreferences/common-patterns.md"Show a hub-spoke network topology"

🔥 Bonus: Generate from Code

Can also create diagrams directly from infrastructure code:

Read the Bicep files in /infra and generate an architecture diagram
Analyze our Terraform modules and create a diagram grouped by subnet
Read azure-pipelines.yml and create a CI/CD pipeline diagram

Supports: Bicep, Terraform, ARM Templates, Azure Pipelines YAML, GitHub Actions

See references/iac-to-diagram.md for detailed prompts and examples.


Prerequisites

pip install diagrams matplotlib --break-system-packages

# Install graphviz (pick your platform):
# macOS:
brew install graphviz
# Ubuntu/Debian:
# apt-get install -y graphviz
# Windows:
# choco install graphviz

Quick Start

from diagrams import Diagram, Cluster, Edge
from diagrams.azure.compute import FunctionApps, AKS, AppServices
from diagrams.azure.network import ApplicationGateway, LoadBalancers
from diagrams.azure.database import CosmosDb, SQLDatabases, CacheForRedis
from diagrams.azure.storage import BlobStorage
from diagrams.azure.integration import LogicApps, ServiceBus, APIManagement
from diagrams.azure.security import KeyVaults
from diagrams.azure.identity import ActiveDirectory
from diagrams.azure.ml import CognitiveServices

with Diagram("Azure Solution Architecture", show=False, direction="TB"):
    users = ActiveDirectory("Users")
    
    with Cluster("Frontend"):
        gateway = ApplicationGateway("App Gateway")
        web = AppServices("Web App")
    
    with Cluster("Backend"):
        api = APIManagement("API Management")
        functions = FunctionApps("Functions")
        aks = AKS("AKS")
    
    with Cluster("Data"):
        cosmos = CosmosDb("Cosmos DB")
        sql = SQLDatabases("SQL Database")
        redis = CacheForRedis("Redis Cache")
        blob = BlobStorage("Blob Storage")
    
    with Cluster("Integration"):
        bus = ServiceBus("Service Bus")
        logic = LogicApps("Logic Apps")
    
    users >> gateway >> web >> api
    api >> [functions, aks]
    functions >> [cosmos, bus]
    aks >> [sql, redis]
    bus >> logic >> blob

Supported Diagram Types

TypeReference FileUse Case
Azure Architecturereferences/azure-components.mdCloud infrastructure, solution designs
Common Patternsreferences/common-patterns.mdWeb apps, microservices, serverless, data platforms
Business Process Flowreferences/business-process-flows.mdWorkflows, swimlanes, decisions
Entity Relationship (ERD)references/entity-relationship-diagrams.mdDatabase schemas, data models
Timeline / Ganttreferences/timeline-gantt-diagrams.mdProject plans, roadmaps
UI Wireframereferences/ui-wireframe-diagrams.mdScreen mockups, dashboards

Azure Service Categories

CategoryImportKey Services
Computediagrams.azure.computeVM, AKS, Functions, App Service, Container Apps, Batch
Networkingdiagrams.azure.networkVNet, Load Balancer, App Gateway, Front Door, Firewall, ExpressRoute
Databasediagrams.azure.databaseSQL, Cosmos DB, PostgreSQL, MySQL, Redis, Synapse
Storagediagrams.azure.storageBlob, Files, Data Lake, NetApp, Queue, Table
Integrationdiagrams.azure.integrationLogic Apps, Service Bus, Event Grid, APIM, Data Factory
Securitydiagrams.azure.securityKey Vault, Sentinel, Defender, Security Center
Identitydiagrams.azure.identityEntra ID, B2C, Managed Identity, Conditional Access
AI/MLdiagrams.azure.mlAzure OpenAI, Cognitive Services, ML Workspace, Bot Service
Analyticsdiagrams.azure.analyticsSynapse, Databricks, Data Explorer, Stream Analytics, Event Hubs
IoTdiagrams.azure.iotIoT Hub, IoT Edge, Digital Twins, Time Series Insights
DevOpsdiagrams.azure.devopsAzure DevOps, Pipelines, Repos, Boards, Artifacts
Webdiagrams.azure.webApp Service, Static Web Apps, CDN, Media Services
Monitordiagrams.azure.monitorMonitor, App Insights, Log Analytics

See references/azure-components.md for the complete list of 700+ components.

Common Architecture Patterns

Web Application (3-Tier)

from diagrams.azure.network import ApplicationGateway
from diagrams.azure.compute import AppServices
from diagrams.azure.database import SQLDatabases

gateway >> AppServices("Web") >> SQLDatabases("DB")

Microservices with AKS

from diagrams.azure.compute import AKS, ACR
from diagrams.azure.network import ApplicationGateway
from diagrams.azure.database import CosmosDb

gateway >> AKS("Cluster") >> CosmosDb("Data")
ACR("Registry") >> AKS("Cluster")

Serverless / Event-Driven

from diagrams.azure.compute import FunctionApps
from diagrams.azure.integration import EventGridTopics, ServiceBus
from diagrams.azure.storage import BlobStorage

EventGridTopics("Events") >> FunctionApps("Process") >> ServiceBus("Queue")
BlobStorage("Trigger") >> FunctionApps("Process")

Data Platform

from diagrams.azure.analytics import DataFactories, Databricks, SynapseAnalytics
from diagrams.azure.storage import DataLakeStorage

DataFactories("Ingest") >> DataLakeStorage("Lake") >> Databricks("Transform") >> SynapseAnalytics("Serve")

Hub-Spoke Networking

from diagrams.azure.network import VirtualNetworks, Firewall, VirtualNetworkGateways

with Cluster("Hub"):
    firewall = Firewall("Firewall")
    vpn = VirtualNetworkGateways("VPN")
    
with Cluster("Spoke 1"):
    spoke1 = VirtualNetworks("Workload 1")
    
spoke1 >> firewall

Connection Syntax

# Basic connections
a >> b                              # Simple arrow
a >> b >> c                         # Chain
a >> [b, c, d]                      # Fan-out (one to many)
[a, b] >> c                         # Fan-in (many to one)

# Labeled connections
a >> Edge(label="HTTPS") >> b       # With label
a >> Edge(label="443") >> b         # Port number

# Styled connections
a >> Edge(style="dashed") >> b      # Dashed line (config/secrets)
a >> Edge(style="dotted") >> b      # Dotted line
a >> Edge(color="red") >> b         # Colored
a >> Edge(color="red", style="bold") >> b  # Combined

# Bidirectional
a >> Edge(label="sync") << b        # Two-way
a - Edge(label="peer") - b          # Undirected

Diagram Attributes

with Diagram(
    "Title",
    show=False,                    # Don't auto-open
    filename="output",             # Output filename (no extension)
    direction="TB",                # TB, BT, LR, RL
    outformat="svg",               # svg (recommended), png, jpg, pdf
    graph_attr={
        "splines": "spline",       # Curved edges
        "nodesep": "1.0",          # Horizontal spacing
        "ranksep": "1.0",          # Vertical spacing
        "pad": "0.5",              # Graph padding
        "bgcolor": "white",        # Background color
    }
):

Clusters (Grouping)

with Cluster("Resource Group"):
    with Cluster("Subnet A"):
        vm1 = VM("VM 1")
        vm2 = VM("VM 2")
    
    with Cluster("Subnet B"):
        db = SQLDatabases("Database")

Cluster styling:

with Cluster("Styled", graph_attr={"bgcolor": "#E8F4FD", "style": "rounded"}):

Troubleshooting

Overlapping Nodes

Increase spacing for complex diagrams:

graph_attr={
    "nodesep": "1.2",   # Horizontal (default 0.25)
    "ranksep": "1.2",   # Vertical (default 0.5)
    "pad": "0.5"
}

Floating Edge Labels

Use xlabel instead of label:

# Instead of Edge(label="text")
a >> Edge(xlabel="text") >> b

Excessive Whitespace

Compress the output:

graph_attr={"pad": "0.2", "margin": "0", "ratio": "compress"}

Force Horizontal Alignment

Use subgraphs with same rank:

with Diagram(...):
    # These will be on the same horizontal level
    with Cluster("") as same_level:
        same_level.dot.body.append('rank=same')
        a = ServiceA("A")
        b = ServiceB("B")

See references/preventing-overlaps.md for detailed guidance.

Output Location

When called from the csa-ppt orchestrator, save diagrams to the workspace:

with Diagram("Name", show=False, filename="outputs/{project}/diagrams/{diagram-name}"):
    # ...

When used standalone, save to any convenient path:

with Diagram("Name", show=False, filename="my-diagram"):
    # ...

⚠️ CRITICAL: Professional Output Standards

The Key Setting: labelloc='t'

To keep labels inside cluster boundaries with the diagrams library, put labels ABOVE icons:

node_attr = {
    "fontname": "Arial Bold",
    "fontsize": "11",
    "labelloc": "t",  # KEY: Labels at TOP - stays inside clusters!
}

with Diagram("Title", node_attr=node_attr, ...):
    # Your diagram code

Full Professional Template

from diagrams import Diagram, Cluster, Edge
from diagrams.azure.compute import AKS
from diagrams.azure.database import SQLDatabases

graph_attr = {
    "bgcolor": "white",
    "pad": "0.8",
    "nodesep": "0.9",
    "ranksep": "0.9",
    "splines": "spline",
    "fontname": "Arial Bold",
    "fontsize": "16",
    "dpi": "200",              # High resolution
}

node_attr = {
    "fontname": "Arial Bold",  # Bold for readability
    "fontsize": "11",
    "labelloc": "t",           # Labels ABOVE icons - KEY!
}

cluster_style = {"margin": "30", "fontname": "Arial Bold", "fontsize": "14"}

with Diagram("My Architecture", 
             direction="TB",
             graph_attr=graph_attr,
             node_attr=node_attr):
    
    with Cluster("Data Tier", graph_attr=cluster_style):
        sql = SQLDatabases("sql-myapp-prod\nS3 tier")

Professional Standards Checklist

CheckRequirement
✅ labelloc='t'Labels above icons (stays in clusters)
✅ Bold fontsfontname="Arial Bold" for readability
✅ Full resource namesActual names from IaC, not abbreviations
✅ High DPIdpi="200" for crisp text
✅ Azure iconsUse diagrams.azure.* components
✅ Cluster marginsmargin="30" or higher

⚠️ ALWAYS review the output image before delivering. If ANY text is outside boxes, increase margins or simplify clusters.

Scripts

ScriptPurpose
scripts/generate_diagram.pyInteractive pattern generator
scripts/multi_diagram_generator.pyMulti-type diagram generator
scripts/ascii_to_diagram.pyConvert ASCII diagrams from markdown
scripts/verify_installation.pyCheck prerequisites

Reference Files

FileContent
references/iac-to-diagram.mdGenerate diagrams from Bicep/Terraform/ARM
references/azure-components.mdComplete list of 700+ Azure components
references/common-patterns.mdReady-to-use architecture patterns
references/business-process-flows.mdWorkflow and swimlane diagrams
references/entity-relationship-diagrams.mdDatabase ERD patterns
references/timeline-gantt-diagrams.mdProject timeline diagrams
references/ui-wireframe-diagrams.mdUI mockup patterns
references/preventing-overlaps.mdLayout troubleshooting guide
references/sequence-auth-flows.mdAuthentication flow patterns
references/quick-reference.mdCopy-paste code snippets

Keep looking

Skills are one crate of 609,689. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.