$npx -y skills add microsoft/azure-skills --skill azure-resource-visualizerAnalyze 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, d
| 1 | # Azure Resource Visualizer - Architecture Diagram Generator |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Core Responsibilities |
| 6 | |
| 7 | 1. **Resource Group Discovery**: List available resource groups when not specified |
| 8 | 2. **Deep Resource Analysis**: Examine all resources, their configurations, and interdependencies |
| 9 | 3. **Relationship Mapping**: Identify and document all connections between resources |
| 10 | 4. **Diagram Generation**: Create detailed, accurate Mermaid diagrams |
| 11 | 5. **Documentation Creation**: Produce clear markdown files with embedded diagrams |
| 12 | |
| 13 | ## Workflow Process |
| 14 | |
| 15 | ### Step 1: Resource Group Selection |
| 16 | |
| 17 | If the user hasn't specified a resource group: |
| 18 | |
| 19 | 1. Use your tools to query available resource groups. If you do not have a tool for this, use `az`. |
| 20 | 2. Present a numbered list of resource groups with their locations |
| 21 | 3. Ask the user to select one by number or name |
| 22 | 4. Wait for user response before proceeding |
| 23 | |
| 24 | If a resource group is specified, validate it exists and proceed. |
| 25 | |
| 26 | ### Step 2: Resource Discovery & Analysis |
| 27 | |
| 28 | 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. |
| 29 | |
| 30 | Once you have the resource group: |
| 31 | |
| 32 | 1. **Query all resources** in the resource group using Azure MCP tools or `az`. |
| 33 | 2. **Analyze each resource** type and capture: |
| 34 | - Resource name and type |
| 35 | - SKU/tier information |
| 36 | - Location/region |
| 37 | - Key configuration properties |
| 38 | - Network settings (VNets, subnets, private endpoints) |
| 39 | - Identity and access (Managed Identity, RBAC) |
| 40 | - Dependencies and connections |
| 41 | |
| 42 | 3. **Map relationships** by identifying: |
| 43 | - **Network connections**: VNet peering, subnet assignments, NSG rules, private endpoints |
| 44 | - **Data flow**: Apps → Databases, Functions → Storage, API Management → Backends |
| 45 | - **Identity**: Managed identities connecting to resources |
| 46 | - **Configuration**: App Settings pointing to Key Vaults, connection strings |
| 47 | - **Dependencies**: Parent-child relationships, required resources |
| 48 | |
| 49 | > **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. |
| 50 | |
| 51 | ### Step 3: Diagram Construction |
| 52 | |
| 53 | Create a **detailed Mermaid diagram** using the `graph TB` (top-to-bottom) or `graph LR` (left-to-right) format. |
| 54 | |
| 55 | See [example-diagram.md](./assets/example-diagram.md) for a complete sample architecture diagram. |
| 56 | |
| 57 | **Key Diagram Requirements:** |
| 58 | |
| 59 | - **Group by layer or purpose**: Network, Compute, Data, Security, Monitoring |
| 60 | - **Include details**: SKUs, tiers, important settings in node labels (use `<br/>` for line breaks) |
| 61 | - **Label all connections**: Describe what flows between resources (data, identity, network) |
| 62 | - **Use meaningful node IDs**: Abbreviations that make sense (APP, FUNC, SQL, KV) |
| 63 | - **Visual hierarchy**: Subgraphs for logical grouping |
| 64 | - **Connection types**: |
| 65 | - `-->` for data flow or dependencies |
| 66 | - `-.->` for optional/conditional connections |
| 67 | - `==>` for critical/primary paths |
| 68 | |
| 69 | **Resource Type Examples:** |
| 70 | - App Service: Include plan tier (B1, S1, P1v2) |
| 71 | - Functions: Include runtime (.NET, Python, Node) |
| 72 | - Databases: Include tier (Basic, Standard, Premium) |
| 73 | - Storage: Include redundancy (LRS, GRS, ZRS) |
| 74 | - VNets: Include address space |
| 75 | - Subnets: Include address range |
| 76 | |
| 77 | ### Step 4: File Creation |
| 78 | |
| 79 | Use [template-architecture.md](./assets/template-architecture.md) as a template and create a markdown file named `[resource-group-name]-architecture.md` with: |
| 80 | |
| 81 | 1. **Header**: Resource group name, subscription, region |
| 82 | 2. **Summary**: Brief overview of the architecture (2-3 paragraphs) |
| 83 | 3. **Resource Inventory**: Table listing all resources with types and key properties |
| 84 | 4. **Architecture Diagram**: The complete Mermaid diagram |
| 85 | 5. **Relationship Details**: Explanation of key connections and data flows |
| 86 | 6. **Notes**: Any important observations, potential issues, or recommendations |
| 87 | |
| 88 | ## Operating Guidelines |
| 89 | |
| 90 | ### Quality Standards |
| 91 | |
| 92 | - **Accuracy**: Verify all resource details before including in diagram |
| 93 | - **Completeness**: |