azure-resource-visualizer
Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources. USE FOR: 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 DO NOT USE FOR: creating/modifying resources (use azure-deploy), security scanning (use azure-security), performance troubleshooting (use azure-diagnostics), code generation (use relevant service skill)
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install microsoft-skills-azure-resource-visualizer
Repository
Skill path: .github/plugins/azure-skills/skills/azure-resource-visualizer
Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources. USE FOR: 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 DO NOT USE FOR: creating/modifying resources (use azure-deploy), security scanning (use azure-security), performance troubleshooting (use azure-diagnostics), code generation (use relevant service skill)
Open repositoryBest for
Primary workflow: Run DevOps.
Technical facets: Full Stack, DevOps, Security.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: microsoft.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install azure-resource-visualizer into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/microsoft/skills before adding azure-resource-visualizer to shared team environments
- Use azure-resource-visualizer for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: azure-resource-visualizer
description: |
Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources.
USE FOR: 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
DO NOT USE FOR: creating/modifying resources (use azure-deploy), security scanning (use azure-security), performance troubleshooting (use azure-diagnostics), code generation (use relevant service skill)
---
# 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](references/azure-resource-graph.md) 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
### 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](./assets/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](./assets/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.
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### references/azure-resource-graph.md
```markdown
# Azure Resource Graph Queries for Resource Discovery
Azure Resource Graph (ARG) enables fast, cross-subscription resource querying using KQL via `az graph query`. Use it for bulk resource discovery and relationship mapping.
## How to Query
Use the `extension_cli_generate` MCP tool to generate `az graph query` commands:
```yaml
mcp_azure_mcp_extension_cli_generate
intent: "query Azure Resource Graph to <describe what you want to find>"
cli-type: "az"
```
Or construct directly:
```bash
az graph query -q "<KQL>" --query "data[].{name:name, type:type}" -o table
```
> ⚠️ **Prerequisite:** `az extension add --name resource-graph`
## Key Tables
| Table | Contains |
|-------|----------|
| `Resources` | All ARM resource instances (name, type, location, properties, tags) |
| `ResourceContainers` | Subscriptions, resource groups, management groups |
## Resource Discovery Patterns
**List all resources by type:**
```kql
Resources | summarize count() by type | order by count_ desc
```
**Inventory by location and type:**
```kql
Resources | summarize count() by type, location | order by type asc
```
**List all resources in a resource group with details:**
```kql
Resources
| where resourceGroup =~ '<rg-name>'
| project name, type, location, sku.name, kind
```
**Cross-subscription resource inventory with subscription names:**
```kql
Resources
| join kind=leftouter (
ResourceContainers
| where type == 'microsoft.resources/subscriptions'
| project subscriptionId, subscriptionName=name
) on subscriptionId
| project name, type, location, resourceGroup, subscriptionName
```
**Discover network relationships (VNets, subnets, NICs):**
```kql
Resources
| where type =~ 'microsoft.network/virtualnetworks'
| mv-expand subnet=properties.subnets
| project vnetName=name, subnetName=subnet.name, addressPrefix=subnet.properties.addressPrefix, resourceGroup
```
**Find App Services and their plans:**
```kql
Resources
| where type =~ 'microsoft.web/sites'
| project name, kind, location, serverFarmId=properties.serverFarmId, resourceGroup
```
## Tips
- Use `=~` for case-insensitive type matching (resource types are lowercase)
- Navigate properties with `properties.fieldName`
- Use `--first N` to limit result count
- Use `--subscriptions` to scope to specific subscriptions
- Use `mv-expand` to flatten arrays (e.g., subnets, IP configurations)
```
### assets/example-diagram.md
```markdown
# Example Architecture Diagram
This example shows a typical Azure resource group with resources organized into logical layers.
## Sample Mermaid Diagram
```mermaid
graph TB
%% Use subgraphs to group related resources
subgraph "Resource Group: [name]"
subgraph "Network Layer"
VNET[Virtual Network<br/>10.0.0.0/16]
SUBNET1[Subnet: web<br/>10.0.1.0/24]
SUBNET2[Subnet: data<br/>10.0.2.0/24]
NSG[Network Security Group]
end
subgraph "Compute Layer"
APP[App Service<br/>Plan: P1v2]
FUNC[Function App<br/>Runtime: .NET 8]
end
subgraph "Data Layer"
SQL[Azure SQL Database<br/>DTU: S1]
STORAGE[Storage Account<br/>Type: Standard LRS]
end
subgraph "Security & Identity"
KV[Key Vault]
MI[Managed Identity]
end
end
%% Define relationships with descriptive labels
APP -->|"HTTPS requests"| FUNC
FUNC -->|"SQL connection"| SQL
FUNC -->|"Blob/Queue access"| STORAGE
APP -->|"Uses identity"| MI
MI -->|"Access secrets"| KV
VNET --> SUBNET1
VNET --> SUBNET2
SUBNET1 --> APP
SUBNET2 --> SQL
NSG -->|"Rules applied to"| SUBNET1
```
## Diagram Features
This example demonstrates:
- **Layered organization**: Resources grouped by function (Network, Compute, Data, Security)
- **Detailed node labels**: Each resource includes configuration details (SKUs, tiers, settings)
- **Descriptive connections**: Relationships are labeled to show data flow and dependencies
- **Subgraphs**: Logical grouping makes the architecture easy to understand
- **Resource variety**: Shows common Azure services and their interconnections
```
### assets/template-architecture.md
```markdown
# Azure Architecture: [Resource Group Name]
**Subscription**: [subscription-name]
**Region**: [primary-region]
**Resource Count**: [count]
**Generated**: [date]
## Overview
[2-3 paragraph summary of the architecture, its purpose, and key components]
## Resource Inventory
| Resource Name | Type | Tier/SKU | Location | Notes |
|--------------|------|----------|----------|-------|
| app-prod-001 | App Service | P1v2 | East US | Production web app |
| func-prod-001 | Function App | Y1 | East US | Consumption plan |
## Architecture Diagram
```mermaid
[full diagram here]
```
## Relationship Details
### Network Architecture
[Describe VNets, subnets, network security]
### Data Flow
[Describe how data moves between components]
### Identity & Access
[Describe managed identities, key vault access, RBAC]
### Dependencies
[Describe critical dependencies and their order]
## Notes & Recommendations
[Any observations, potential issues, or suggestions]
```