apex-azure-resources
Skill216 starsChanged 2 months agoMITView on GitHub
**ANALYSIS SKILL** — List, find, and visualize Azure resources via Resource Graph or Mermaid. WHEN: 'list resources', 'list VMs', 'find orphaned resources', 'resource inventory', 'cross-subscription query', 'visualize Azure resources', 'diagram my resources'. DO NOT USE FOR: deploys (apex-azure-deploy), cost (apex-azure-cost-optimization), security (apex-azure-compliance), troubleshooting (apex-azure-diagnostics).
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- apex-agent-authoringSkill
- apex-azure-adrSkill
- apex-azure-artifactsSkill
- apex-azure-bicep-patternsSkill
- apex-azure-cloud-migrateSkill
- apex-azure-complianceSkill
- apex-azure-computeSkill
- apex-azure-cost-optimizationSkill
- apex-azure-defaultsSkill
- apex-azure-deploySkill
- apex-azure-diagnosticsSkill
- apex-azure-governance-discoverySkill
- apex-azure-kubernetesSkill
- apex-azure-kustoSkill
- apex-azure-prepareSkill
- apex-azure-quotasSkill
- apex-azure-rbacSkill
- apex-azure-reliabilitySkill
- apex-azure-storageSkill
- apex-azure-upgradeSkill
- apex-azure-validateSkill
- apex-context-managementSkill
- apex-entra-app-registrationSkill
- apex-github-operationsSkill
- apex-golden-principlesSkill
- apex-host-debug-log-exportSkill
- apex-host-git-commitSkill
- apex-host-workflow-startSkill
- apex-iac-commonSkill
- apex-mermaidSkill
- apex-microsoft-docsSkill
- apex-python-diagramsSkill
- apex-terraform-patternsSkill
- apex-terraform-search-importSkill
- apex-terraform-testSkill
- apex-unslopSkill
- apex-vendor-promptingSkill
- apex-workflow-engineSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Use this mode when the user wants to list / find / show Azure resources.
- Distinctive: line 114
Use this mode when the user asks for a diagram of a resource group, or to understand how individual resources fit together.
- Distinctive: line 121
Create an architecture diagram of an existing resource group
- Distinctive: line 123
Document deployed infrastructure with embedded Mermaid
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Azure Resources
Discover, inventory, and visualize existing Azure resources. Combines two related capabilities:
- Lookup mode — query and list resources (single type or cross-cutting via
Azure Resource Graph). Replaces the legacy
azure-resource-lookupskill. - Visualize mode — analyze a resource group and generate a detailed Mermaid
architecture diagram. Replaces the legacy
azure-resource-visualizerskill.
Both modes share references/azure-resource-graph.md for KQL patterns.
Prerequisites
Confirm authorized subscription IDs and read access. Use installed Azure CLI with Resource Graph support or an available MCP tool; tool names below are routing hints, not proof of runtime availability. Installation requires authorization.
Mode A: Lookup
Use this mode when the user wants to list / find / show Azure resources.
When to Use Lookup
- List resources of any type (VMs, web apps, storage accounts, container apps, databases, etc.)
- Show resources in a specific subscription or resource group
- Query resources across multiple subscriptions or resource types
- Find orphaned resources (unattached disks, unused NICs, idle IPs)
- Discover resources missing required tags or configurations
- Get a resource inventory spanning multiple types
- Find resources in a specific state (unhealthy, failed provisioning, stopped)
- Answer "what resources do I have?" or "show me my Azure resources"
- List web apps, websites or App Services — there is no dedicated MCP
listcommand for App Service, so these prompts go to Azure Resource Graph
💡 Tip: For single-resource-type queries, first check if a dedicated MCP tool can handle it (see routing table below). If none exists, use Azure Resource Graph (ARG).
Quick Reference
| Property | Value |
| Query Language | KQL (Kusto Query Language subset) |
| CLI Command | az graph query -q "<KQL>" -o table |
| Extension | az extension add --name resource-graph |
| MCP Tool | extension_cli_generate with intent for az graph query |
| Best For | Cross-subscription queries, orphaned resources, tag audits |
MCP Tools
| Tool | Purpose | When to Use |
extension_cli_generate | Generate az graph query commands | Primary — generate ARG queries from user intent |
mcp_azure-mcp_subscription_list | List available subscriptions | Discover subscription scope before querying |
mcp_azure-mcp_group_list | List resource groups | Narrow query scope |
Rules
- Prefer dedicated MCP tools for single-resource-type queries (
compute,storage,cosmos, etc.) before falling back to Azure Resource Graph - Use ARG for cross-cutting queries — cross-subscription, cross-type, orphaned resources, tag audits
- Generate queries via
extension_cli_generate— do not hand-author KQL when intent-based generation is available - Shape output with
--queryJMESPath for tabular display; do not load raw JSON dumps into context - Mode A is read-only — lookup never modifies resources; remediation is out of scope (use
apex-azure-deploy) - Mode B (Visualize) is for documentation — emit Mermaid only when the user explicitly asks for a diagram; do not auto-visualize lookup results
- No secrets in diagrams or inventories — represent keys, connection strings and Key Vault secrets with placeholder names only; never copy values from app settings or outputs
- Out of scope: deploying resources (use
apex-azure-deploy), cost optimization (useapex-azure-cost-optimization), security scanning (useapex-azure-compliance), troubleshooting (useapex-azure-diagnostics)
Lookup Workflow
Three-step procedure: (1) check for a dedicated MCP tool by resource type
(compute / storage / cosmos / keyvault / sql / acr / aks /
appservice / eventhubs / servicebus); (2) if no full-coverage tool, generate an
Azure Resource Graph query via extension_cli_generate; (3) execute with --query
JMESPath shaping. Full per-resource-type tool table and example commands in
references/lookup-workflow.md.
Lookup Constraints
- ✅ Always use
=~for case-insensitive type matching (types are lowercase) - ✅ Always scope queries with
--subscriptions;--firstlimits rows, not authorization scope - ✅ Prefer dedicated MCP tools for single-resource-type queries
- ❌ Never use ARG for real-time monitoring (data has slight delay)
- ❌ Never attempt mutations through ARG (read-only)
Lookup Error Handling
| Error | Cause | Fix |
resource-graph extension not found | Extension not installed | az extension add --name resource-graph |
AuthorizationFailed | No read access to subscription | Check RBAC — need Reader role |
BadRequest on query | Invalid KQL syntax | Verify table/column names; use =~ for case-insensitive match |
| Empty results | No matching resources or wrong scope | Check --subscriptions flag; verify resource type spelling |
Mode B: Visualize
Use this mode when the user asks for a diagram of a resource group, or to understand how individual resources fit together.
When to Use Visualize
The user wants to:
- Create an architecture diagram of an existing resource group
- See how resources connect (VNets, private endpoints, identities, app settings)
- Document deployed infrastructure with embedded Mermaid
For the full Visualize-mode procedure (resource discovery, diagram construction, file creation, quality standards, constraints, edge cases, and output format), load references/visualize.md.
Reference Index
Load these on demand — do NOT read all at once:
| Reference | Mode | When to Load |
references/azure-resource-graph.md | Both | KQL patterns, ARG query examples |
| Lookup workflow | Lookup | Dedicated-tool routing and scoped ARG fallback |
references/visualize.md | Visualize | Full Visualize-mode workflow (Steps 2–4, constraints) |
assets/example-diagram.md | Visualize | Sample completed Mermaid architecture diagram |
assets/template-architecture.md | Visualize | Markdown template for the generated documentation |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

