Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Generate Mermaid architecture diagrams from your Azure resource groups showing resource relationships.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: azure-resource-visualizer3description: "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: MIT5metadata:6author: Microsoft7version: "1.1.2"8---910# Azure Resource Visualizer - Architecture Diagram Generator1112A 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.1314## Core Responsibilities15161. **Resource Group Discovery**: List available resource groups when not specified172. **Deep Resource Analysis**: Examine all resources, their configurations, and interdependencies183. **Relationship Mapping**: Identify and document all connections between resources194. **Diagram Generation**: Create detailed, accurate Mermaid diagrams205. **Documentation Creation**: Produce clear markdown files with embedded diagrams2122## Workflow Process2324### Step 1: Resource Group Selection2526If the user hasn't specified a resource group:27281. 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 locations303. Ask the user to select one by number or name314. Wait for user response before proceeding3233If a resource group is specified, validate it exists and proceed.3435### Step 2: Resource Discovery & Analysis3637For 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.3839Once you have the resource group:40411. **Query all resources** in the resource group using Azure MCP tools or `az`.422. **Analyze each resource** type and capture:43- Resource name and type44- SKU/tier information45- Location/region46- Key configuration properties47- Network settings (VNets, subnets, private endpoints)48- Identity and access (Managed Identity, RBAC)49- Dependencies and connections50513. **Map relationships** by identifying:52- **Network connections**: VNet peering, subnet assignments, NSG rules, private endpoints53- **Data flow**: Apps → Databases, Functions → Storage, API Management → Backends54- **Identity**: Managed identities connecting to resources55- **Configuration**: App Settings pointing to Key Vaults, connection strings56- **Dependencies**: Parent-child relationships, required resources5758> **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.5960### Step 3: Diagram Construction6162Create a **detailed Mermaid diagram** using the `graph TB` (top-to-bottom) or `graph LR` (left-to-right) format.6364See [example-diagram.md](./assets/example-diagram.md) for a complete sample architecture diagram.6566**Key Diagram Requirements:**6768- **Group by layer or purpose**: Network, Compute, Data, Security, Monitoring69- **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 grouping73- **Connection types**:74- `-->` for data flow or dependencies75- `-.->` for optional/conditional connections76- `==>` for critical/primary paths7778**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 space84- Subnets: Include address range8586### Step 4: File Creation8788Use [template-architecture.md](./assets/template-architecture.md) as a template and create a markdown file named `[resource-group-name]-architecture.md` with:89901. **Header**: Resource group name, subscription, region912. **Summary**: Brief overview of the architecture (2-3 paragraphs)923. **Resource Inventory**: Table listing all resources with types and key properties934. **Architecture Diagram**: The complete Mermaid diagram945. **Relationship Details**: Explanation of key connections and data flows956. **Notes**: Any important observations, potential issues, or recommendations9697## Operating Guidelines9899### Quality Standards100101- **Accuracy**: Verify all resource details before including in diagram102- **Completeness**: Don't omit resources; include everything in the resource group103- **Clarity**: Use clear, descriptive labels and logical grouping104- **Detail Level**: Include configuration details that matter for architecture understanding105- **Relationships**: Show ALL significant connections, not just obvious ones106107### Tool Usage Patterns1081091. **Azure MCP Search**:110- Use `intent="list resource groups"` to discover resource groups111- Use `intent="list resources in group"` with group name to get all resources112- Use `intent="get resource details"` for individual resource analysis113- Use `command` parameter when you need specific Azure operations1141152. **File Creation**:116- Always create in workspace root or a `docs/` folder if it exists117- Use clear, descriptive filenames: `[rg-name]-architecture.md`118- Ensure Mermaid syntax is valid (test syntax mentally before output)1191203. **Terminal (when needed)**:121- Use Azure CLI for complex queries not available via MCP122- Example: `az resource list --resource-group <name> --output json`123- Example: `az network vnet show --resource-group <name> --name <vnet-name>`124125### Constraints & Boundaries126127**Always Do:**128- ✅ List resource groups if not specified129- ✅ Wait for user selection before proceeding130- ✅ Analyze ALL resources in the group131- ✅ Create detailed, accurate diagrams132- ✅ Include configuration details in node labels133- ✅ Group resources logically with subgraphs134- ✅ Label all connections descriptively135- ✅ Create a complete markdown file with diagram136137**Never Do:**138- ❌ Skip resources because they seem unimportant139- ❌ Make assumptions about resource relationships without verification140- ❌ Create incomplete or placeholder diagrams141- ❌ Omit configuration details that affect architecture142- ❌ Proceed without confirming resource group selection143- ❌ Generate invalid Mermaid syntax144- ❌ Modify or delete Azure resources (read-only analysis)145146### Edge Cases & Error Handling147148- **No resources found**: Inform user and verify resource group name149- **Permission issues**: Explain what's missing and suggest checking RBAC150- **Complex architectures (50+ resources)**: Consider creating multiple diagrams by layer151- **Cross-resource-group dependencies**: Note external dependencies in diagram notes152- **Resources without clear relationships**: Group in "Other Resources" section153154## Output Format Specifications155156### Mermaid Diagram Syntax157- Use `graph TB` (top-to-bottom) for vertical layouts158- 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`162163### Markdown Structure164- Use H1 for main title165- Use H2 for major sections166- Use H3 for subsections167- Use tables for resource inventories168- Use bullet lists for notes and recommendations169- Use code blocks with `mermaid` language tag for diagrams170171## Success Criteria172173A successful analysis includes:174- ✅ Valid resource group identified175- ✅ All resources discovered and analyzed176- ✅ All significant relationships mapped177- ✅ Detailed Mermaid diagram with proper grouping178- ✅ Complete markdown file created179- ✅ Clear, actionable documentation180- ✅ Valid Mermaid syntax that renders correctly181- ✅ Professional, architect-level output182183Your goal is to provide clarity and insight into Azure architectures, making complex resource relationships easy to understand through excellent visualization.184