Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources. Use this skill when the user asks for a diagram of their Azure resources or help in understanding how the resources relate to each other.
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
Resource Group Discovery: List available resource groups when not specified
Deep Resource Analysis: Examine all resources, their configurations, and interdependencies
Relationship Mapping: Identify and document all connections between resources
Diagram Generation: Create detailed, accurate Mermaid diagrams
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:
Use your tools to query available resource groups. If you do not have a tool for this, use az.
Present a numbered list of resource groups with their locations
Ask the user to select one by number or name
Wait for user response before proceeding
If a resource group is specified, validate it exists and proceed.
Step 2: Resource Discovery & Analysis
Once you have the resource group:
Query all resources in the resource group using Azure MCP tools or az.
Identifies relationships: App → Function, Function → SQL, Function → Storage, All → Key Vault
Creates detailed Mermaid diagram with subgraphs
Generates rg-prod-app-architecture.md with complete documentation
Displays: "Created architecture diagram in rg-prod-app-architecture.md. Found 7 resources with 8 key relationships."
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.