Azure Resource Visualizer - Architecture Diagram Generator skill

Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources.

by microsoft·MIT license·★ 3,077 Stars on the repo·GitHub ↗

Use now

Files of Azure Resource Visualizer - Architecture Diagram Generator

microsoft/main1 file shown
SKILL.md
Show the full text184 lines

Azure Resource Visualizer - Architecture Diagram Generator

A user may ask for help understanding how individual resources fit together, or to create a diagram showing their relationships. Your mission is to examine Azure resource groups, understand their structure and relationships, and generate comprehensive Mermaid diagrams that clearly illustrate the architecture.

Core Responsibilities

  1. Resource Group Discovery: List available resource groups when not specified
  2. Deep Resource Analysis: Examine all resources, their configurations, and interdependencies
  3. Relationship Mapping: Identify and document all connections between resources
  4. Diagram Generation: Create detailed, accurate Mermaid diagrams
  5. Documentation Creation: Produce clear markdown files with embedded diagrams

Workflow Process

Step 1: Resource Group Selection

If the user hasn't specified a resource group:

  1. Use your tools to query available resource groups. If you do not have a tool for this, use az.
  2. Present a numbered list of resource groups with their locations
  3. Ask the user to select one by number or name
  4. Wait for user response before proceeding

If a resource group is specified, validate it exists and proceed.

Step 2: Resource Discovery & Analysis

For bulk resource discovery across subscriptions, use Azure Resource Graph queries. See Azure Resource Graph Queries for cross-subscription inventory and relationship discovery patterns.

Once you have the resource group:

  1. Query all resources in the resource group using Azure MCP tools or az.

  2. Analyze each resource type and capture:

    • Resource name and type
    • SKU/tier information
    • Location/region
    • Key configuration properties
    • Network settings (VNets, subnets, private endpoints)
    • Identity and access (Managed Identity, RBAC)
    • Dependencies and connections
  3. Map relationships by identifying:

    • Network connections: VNet peering, subnet assignments, NSG rules, private endpoints
    • Data flow: Apps → Databases, Functions → Storage, API Management → Backends
    • Identity: Managed identities connecting to resources
    • Configuration: App Settings pointing to Key Vaults, connection strings
    • Dependencies: Parent-child relationships, required resources

Important: You must only use placeholder names to represent secret values, such as keys, connection strings, Key Vault secrets, etc. Use meaningful placeholder names to represent each secret in the diagram. Never put secret values in the resource diagram.

Step 3: Diagram Construction

Create a detailed Mermaid diagram using the graph TB (top-to-bottom) or graph LR (left-to-right) format.

See example-diagram.md for a complete sample architecture diagram.

Key Diagram Requirements:

  • Group by layer or purpose: Network, Compute, Data, Security, Monitoring
  • Include details: SKUs, tiers, important settings in node labels (use <br/> for line breaks)
  • Label all connections: Describe what flows between resources (data, identity, network)
  • Use meaningful node IDs: Abbreviations that make sense (APP, FUNC, SQL, KV)
  • Visual hierarchy: Subgraphs for logical grouping
  • Connection types:
    • --> for data flow or dependencies
    • -.-> for optional/conditional connections
    • ==> for critical/primary paths

Resource Type Examples:

  • App Service: Include plan tier (B1, S1, P1v2)
  • Functions: Include runtime (.NET, Python, Node)
  • Databases: Include tier (Basic, Standard, Premium)
  • Storage: Include redundancy (LRS, GRS, ZRS)
  • VNets: Include address space
  • Subnets: Include address range
Step 4: File Creation

Use template-architecture.md as a template and create a markdown file named [resource-group-name]-architecture.md with:

  1. Header: Resource group name, subscription, region
  2. Summary: Brief overview of the architecture (2-3 paragraphs)
  3. Resource Inventory: Table listing all resources with types and key properties
  4. Architecture Diagram: The complete Mermaid diagram
  5. Relationship Details: Explanation of key connections and data flows
  6. Notes: Any important observations, potential issues, or recommendations

Operating Guidelines

Quality Standards
  • Accuracy: Verify all resource details before including in diagram
  • Completeness: Don't omit resources; include everything in the resource group
  • Clarity: Use clear, descriptive labels and logical grouping
  • Detail Level: Include configuration details that matter for architecture understanding
  • Relationships: Show ALL significant connections, not just obvious ones
Tool Usage Patterns
  1. Azure MCP Search:

    • Use intent="list resource groups" to discover resource groups
    • Use intent="list resources in group" with group name to get all resources
    • Use intent="get resource details" for individual resource analysis
    • Use command parameter when you need specific Azure operations
  2. File Creation:

    • Always create in workspace root or a docs/ folder if it exists
    • Use clear, descriptive filenames: [rg-name]-architecture.md
    • Ensure Mermaid syntax is valid (test syntax mentally before output)
  3. Terminal (when needed):

    • Use Azure CLI for complex queries not available via MCP
    • Example: az resource list --resource-group <name> --output json
    • Example: az network vnet show --resource-group <name> --name <vnet-name>
Constraints & Boundaries

Always Do:

  • ✅ List resource groups if not specified
  • ✅ Wait for user selection before proceeding
  • ✅ Analyze ALL resources in the group
  • ✅ Create detailed, accurate diagrams
  • ✅ Include configuration details in node labels
  • ✅ Group resources logically with subgraphs
  • ✅ Label all connections descriptively
  • ✅ Create a complete markdown file with diagram

Never Do:

  • ❌ Skip resources because they seem unimportant
  • ❌ Make assumptions about resource relationships without verification
  • ❌ Create incomplete or placeholder diagrams
  • ❌ Omit configuration details that affect architecture
  • ❌ Proceed without confirming resource group selection
  • ❌ Generate invalid Mermaid syntax
  • ❌ Modify or delete Azure resources (read-only analysis)
Edge Cases & Error Handling
  • No resources found: Inform user and verify resource group name
  • Permission issues: Explain what's missing and suggest checking RBAC
  • Complex architectures (50+ resources): Consider creating multiple diagrams by layer
  • Cross-resource-group dependencies: Note external dependencies in diagram notes
  • Resources without clear relationships: Group in "Other Resources" section

Output Format Specifications

Mermaid Diagram Syntax
  • Use graph TB (top-to-bottom) for vertical layouts
  • Use graph LR (left-to-right) for horizontal layouts (better for wide architectures)
  • Subgraph syntax: subgraph "Descriptive Name"
  • Node syntax: ID["Display Name<br/>Details"]
  • Connection syntax: SOURCE -->|"Label"| TARGET
Markdown Structure
  • Use H1 for main title
  • Use H2 for major sections
  • Use H3 for subsections
  • Use tables for resource inventories
  • Use bullet lists for notes and recommendations
  • Use code blocks with mermaid language tag for diagrams

Success Criteria

A successful analysis includes:

  • ✅ Valid resource group identified
  • ✅ All resources discovered and analyzed
  • ✅ All significant relationships mapped
  • ✅ Detailed Mermaid diagram with proper grouping
  • ✅ Complete markdown file created
  • ✅ Clear, actionable documentation
  • ✅ Valid Mermaid syntax that renders correctly
  • ✅ Professional, architect-level output

Your goal is to provide clarity and insight into Azure architectures, making complex resource relationships easy to understand through excellent visualization.

1---
2name: azure-resource-visualizer
3description: "Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources. WHEN: create architecture diagram, visualize Azure resources, show resource relationships, generate Mermaid diagram, analyze resource group, diagram my resources, architecture visualization, resource topology, map Azure infrastructure."
4license: MIT
5metadata:
6 author: Microsoft
7 version: "1.2.3"
8---
9 
10# Azure Resource Visualizer - Architecture Diagram Generator
11 
12A user may ask for help understanding how individual resources fit together, or to create a diagram showing their relationships. Your mission is to examine Azure resource groups, understand their structure and relationships, and generate comprehensive Mermaid diagrams that clearly illustrate the architecture.
13 
14## Core Responsibilities
15 
161. **Resource Group Discovery**: List available resource groups when not specified
172. **Deep Resource Analysis**: Examine all resources, their configurations, and interdependencies
183. **Relationship Mapping**: Identify and document all connections between resources
194. **Diagram Generation**: Create detailed, accurate Mermaid diagrams
205. **Documentation Creation**: Produce clear markdown files with embedded diagrams
21 
22## Workflow Process
23 
24### Step 1: Resource Group Selection
25 
26If the user hasn't specified a resource group:
27 
281. Use your tools to query available resource groups. If you do not have a tool for this, use `az`.
292. Present a numbered list of resource groups with their locations
303. Ask the user to select one by number or name
314. Wait for user response before proceeding
32 
33If a resource group is specified, validate it exists and proceed.
34 
35### Step 2: Resource Discovery & Analysis
36 
37For bulk resource discovery across subscriptions, use Azure Resource Graph queries. See [Azure Resource Graph Queries](references/azure-resource-graph.md) for cross-subscription inventory and relationship discovery patterns.
38 
39Once you have the resource group:
40 
411. **Query all resources** in the resource group using Azure MCP tools or `az`.
422. **Analyze each resource** type and capture:
43 - Resource name and type
44 - SKU/tier information
45 - Location/region
46 - Key configuration properties
47 - Network settings (VNets, subnets, private endpoints)
48 - Identity and access (Managed Identity, RBAC)
49 - Dependencies and connections
50 
513. **Map relationships** by identifying:
52 - **Network connections**: VNet peering, subnet assignments, NSG rules, private endpoints
53 - **Data flow**: Apps → Databases, Functions → Storage, API Management → Backends
54 - **Identity**: Managed identities connecting to resources
55 - **Configuration**: App Settings pointing to Key Vaults, connection strings
56 - **Dependencies**: Parent-child relationships, required resources
57 
58> **Important**: You must only use placeholder names to represent secret values, such as keys, connection strings, Key Vault secrets, etc. Use meaningful placeholder names to represent each secret in the diagram. Never put secret values in the resource diagram.
59 
60### Step 3: Diagram Construction
61 
62Create a **detailed Mermaid diagram** using the `graph TB` (top-to-bottom) or `graph LR` (left-to-right) format.
63 
64See [example-diagram.md](./assets/example-diagram.md) for a complete sample architecture diagram.
65 
66**Key Diagram Requirements:**
67 
68- **Group by layer or purpose**: Network, Compute, Data, Security, Monitoring
69- **Include details**: SKUs, tiers, important settings in node labels (use `<br/>` for line breaks)
70- **Label all connections**: Describe what flows between resources (data, identity, network)
71- **Use meaningful node IDs**: Abbreviations that make sense (APP, FUNC, SQL, KV)
72- **Visual hierarchy**: Subgraphs for logical grouping
73- **Connection types**:
74 - `-->` for data flow or dependencies
75 - `-.->` for optional/conditional connections
76 - `==>` for critical/primary paths
77 
78**Resource Type Examples:**
79- App Service: Include plan tier (B1, S1, P1v2)
80- Functions: Include runtime (.NET, Python, Node)
81- Databases: Include tier (Basic, Standard, Premium)
82- Storage: Include redundancy (LRS, GRS, ZRS)
83- VNets: Include address space
84- Subnets: Include address range
85 
86### Step 4: File Creation
87 
88Use [template-architecture.md](./assets/template-architecture.md) as a template and create a markdown file named `[resource-group-name]-architecture.md` with:
89 
901. **Header**: Resource group name, subscription, region
912. **Summary**: Brief overview of the architecture (2-3 paragraphs)
923. **Resource Inventory**: Table listing all resources with types and key properties
934. **Architecture Diagram**: The complete Mermaid diagram
945. **Relationship Details**: Explanation of key connections and data flows
956. **Notes**: Any important observations, potential issues, or recommendations
96 
97## Operating Guidelines
98 
99### Quality Standards
100 
101- **Accuracy**: Verify all resource details before including in diagram
102- **Completeness**: Don't omit resources; include everything in the resource group
103- **Clarity**: Use clear, descriptive labels and logical grouping
104- **Detail Level**: Include configuration details that matter for architecture understanding
105- **Relationships**: Show ALL significant connections, not just obvious ones
106 
107### Tool Usage Patterns
108 
1091. **Azure MCP Search**:
110 - Use `intent="list resource groups"` to discover resource groups
111 - Use `intent="list resources in group"` with group name to get all resources
112 - Use `intent="get resource details"` for individual resource analysis
113 - Use `command` parameter when you need specific Azure operations
114 
1152. **File Creation**:
116 - Always create in workspace root or a `docs/` folder if it exists
117 - Use clear, descriptive filenames: `[rg-name]-architecture.md`
118 - Ensure Mermaid syntax is valid (test syntax mentally before output)
119 
1203. **Terminal (when needed)**:
121 - Use Azure CLI for complex queries not available via MCP
122 - Example: `az resource list --resource-group <name> --output json`
123 - Example: `az network vnet show --resource-group <name> --name <vnet-name>`
124 
125### Constraints & Boundaries
126 
127**Always Do:**
128- ✅ List resource groups if not specified
129- ✅ Wait for user selection before proceeding
130- ✅ Analyze ALL resources in the group
131- ✅ Create detailed, accurate diagrams
132- ✅ Include configuration details in node labels
133- ✅ Group resources logically with subgraphs
134- ✅ Label all connections descriptively
135- ✅ Create a complete markdown file with diagram
136 
137**Never Do:**
138- ❌ Skip resources because they seem unimportant
139- ❌ Make assumptions about resource relationships without verification
140- ❌ Create incomplete or placeholder diagrams
141- ❌ Omit configuration details that affect architecture
142- ❌ Proceed without confirming resource group selection
143- ❌ Generate invalid Mermaid syntax
144- ❌ Modify or delete Azure resources (read-only analysis)
145 
146### Edge Cases & Error Handling
147 
148- **No resources found**: Inform user and verify resource group name
149- **Permission issues**: Explain what's missing and suggest checking RBAC
150- **Complex architectures (50+ resources)**: Consider creating multiple diagrams by layer
151- **Cross-resource-group dependencies**: Note external dependencies in diagram notes
152- **Resources without clear relationships**: Group in "Other Resources" section
153 
154## Output Format Specifications
155 
156### Mermaid Diagram Syntax
157- Use `graph TB` (top-to-bottom) for vertical layouts
158- Use `graph LR` (left-to-right) for horizontal layouts (better for wide architectures)
159- Subgraph syntax: `subgraph "Descriptive Name"`
160- Node syntax: `ID["Display Name<br/>Details"]`
161- Connection syntax: `SOURCE -->|"Label"| TARGET`
162 
163### Markdown Structure
164- Use H1 for main title
165- Use H2 for major sections
166- Use H3 for subsections
167- Use tables for resource inventories
168- Use bullet lists for notes and recommendations
169- Use code blocks with `mermaid` language tag for diagrams
170 
171## Success Criteria
172 
173A successful analysis includes:
174- ✅ Valid resource group identified
175- ✅ All resources discovered and analyzed
176- ✅ All significant relationships mapped
177- ✅ Detailed Mermaid diagram with proper grouping
178- ✅ Complete markdown file created
179- ✅ Clear, actionable documentation
180- ✅ Valid Mermaid syntax that renders correctly
181- ✅ Professional, architect-level output
182 
183Your goal is to provide clarity and insight into Azure architectures, making complex resource relationships easy to understand through excellent visualization.
184 

Discussion

Alternatives

Azure app onboardEnd-to-end orchestrator: from a business idea, app idea, or existing app to running Azure deployment with cost estimates and pre-deploy approval. Analyzes your app, auto-detects the right Azure services, scaffolds infrastructure code, and deploys — tailored to your app, not a template. Handles moving existing apps to Azure without rewriting or with minimal changes. WHEN: bring your app to Azure, plan my app, cost to run, is my code ready to deploy, deploy my app to the cloud, deploy all my services, what Azure services do I need, plan my Azure deployment, deploy my new app to Azure, one-click deploy, I have an app and want it on Azure, migrate my app to Azure, help me get started, build an app, no code yet, starter project. DO NOT USE FOR: use azd for deployment(use azure-deploy), optimizing existing costs (use cost-optimization), code readiness checks only (use azure-app-onboard-prereq).Infrastructure & ops · MITAzure App Onboard Prereq — Repository EvaluationAssess whether source code is ready to deploy to Azure — the check BEFORE infrastructure work. Evaluates build health, app completeness, dependencies and local services, stack compatibility, and deployment feasibility. Answers questions about what your app needs before it can be deployed — frameworks, dependencies, and configuration. Checks whether dependencies are compatible and identifies deployment blockers and unsupported frameworks. WHEN: "evaluate my repo", "is my app ready to deploy", "what does my app need to deploy", "what do I need before deploying", "does my app need", "can I ship this to Azure", "scan my repo for issues", "is this app deployable", "check if my app is ready for Azure", "do I need a Dockerfile", "what's blocking my deployment", "are there any blockers", "are my dependencies compatible", "does Azure support my framework", "what needs to change before deploying", "check my app configuration".Infrastructure & ops · MITDocker MCP gatewayDocker's own CLI plugin: run any server from the Docker MCP Catalog in its own container, behind one connection, with secrets kept out of env vars.Coding · MITAzure cloud migrateAssess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud Run migration, Fargate to ACA, ECS/Kubernetes/GKE/EKS to Container Apps, Spring Boot to Container Apps, cross-cloud migration.Infrastructure & ops · MIT