skills/azure-reliability/SKILL.md
Assess and improve the reliability posture of PaaS Applications (Azure Functions and Azure App Service). Scans deployed resources for zone redundancy, ZRS storage, health probes, and multi-region failover. Presents a feature-pivoted checklist, then drives staged remediation (CLI or IaC patches) end-to-end with user confirmation. WHEN: "assess reliability", "check reliability", "zone redundant", "multi-region failover", "high availability", "disaster recovery", "single points of failure", "reliability posture", "resiliency".
npx skillsauth add microsoft/azure-skills azure-reliabilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Property | Details | |---|---| | Best for | Reliability posture assessment, zone redundancy enablement, multi-region failover setup | | Primary capabilities | Reliability assessment table, Zone Redundancy Configuration, Multi-Region IaC Generation | | Supported services | Azure Functions, App Service (Container Apps planned for a future version) | | MCP tools | Azure Resource Graph queries, Azure CLI commands |
Activate this skill when user wants to:
Scope note: This skill currently covers Azure Functions and Azure App Service only. If the user asks about Azure Container Apps reliability, acknowledge that support is planned but not yet available, and only proceed with the parts that apply to App Service and Functions resources in scope.
az loginaz extension add --name resource-graph| Tool | Purpose |
|------|---------|
| mcp_azure_mcp_extension_cli_generate | Generate az CLI commands for resource queries and configuration |
| mcp_azure_mcp_subscription_list | List available subscriptions |
| mcp_azure_mcp_group_list | List resource groups |
Primary query method: Azure Resource Graph via az graph query (requires az extension add --name resource-graph).
Important: Always scope queries to the user's specified resource group or subscription. Add these filters to every Resource Graph query:
| where resourceGroup =~ '<rg-name>'--subscriptions <sub-id> flag on az graph query| where name =~ '<app-name>'Two-step assessment: platform-level discovery first, then per-service deep dive.
Step 1 — Platform discovery (find what's there). Use these to enumerate resources in scope and detect cross-cutting reliability gaps:
| Platform check | Reference | |---|---| | Zone redundancy — discovery | references/zone-redundancy-checks.md | | Storage redundancy (cross-service) | references/storage-redundancy-checks.md | | Multi-region & global load balancers | references/multi-region-checks.md | | Front Door / Traffic Manager / App Insights probes | references/health-probe-checks.md |
Step 2 — Per-service deep dive. For each compute resource discovered in Step 1, load the matching service reference. The service reference is the single source of truth for that service's plan/SKU rules, assessment queries, CLI commands, IaC patches (Bicep + Terraform + AVM), and reporting hints.
This skill version ships only the Azure Functions and App Service per-service references. Other compute services are listed below explicitly so the dispatch logic is unambiguous: if a resource matches an unsupported row, do not attempt to load a reference, fabricate CLI commands, or generate IaC patches for it.
| Service detected | Reference |
|---|---|
| Azure Functions (microsoft.web/serverfarms with kind contains 'functionapp') | references/services/functions/reliability.md |
| Azure App Service (non-Functions sites: microsoft.web/sites without kind contains 'functionapp', microsoft.web/serverfarms without kind contains 'functionapp') | references/services/app-service/reliability.md |
| Azure Container Apps (microsoft.app/containerapps, microsoft.app/managedenvironments) | ⚪ Not yet shipped — planned for a future version |
Handling unsupported services: If a resource matches an unsupported row above, surface it in the discovery summary, mark it as
⚪ not assessed (planned)in the Phase 3 table, and skip the per-service remediation steps for it. Do not attempt to fabricate CLI commands or IaC patches for those services.
Present findings as a feature-pivoted table: one row per reliability feature (Zone redundancy on compute, Zone-redundant storage, Health probes, Multi-region failover), with a single status indicator and the specific resources that are relevant to that feature. This avoids the noise of one-row-per-resource with mostly n/a cells. Do not assign numeric scores or grades.
🔍 Reliability Assessment — {scope}
─────────────────────────────────────────────────────────────────────────────────────────────
Reliability Feature Status Resources
─────────────────────────────────────────────────────────────────────────────────────────────
Zone redundancy — compute 🔴 OFF • plan-web-ii5trxva2ark4 (P1v3)
• plan-ii5trxva2ark4 (FC1)
Zone-redundant storage 🔴 GRS • stii5trxva2ark4 (defaulted; no SKU set in IaC)
Health probes 🔴 OFF • func-api-ii5trxva2ark4 — needs code change (FC1)
• app-web-ii5trxva2ark4 — no health check path
Multi-region failover 🔴 OFF • Single region (eastus) only — Front Door not configured
─────────────────────────────────────────────────────────────────────────────────────────────
Want me to fix the 🔴 items? I'll do the quick wins first (App
plan zone redundancy + health checks on supported plans), then ask before
storage migration and multi-region setup. (yes/no)
Rules for the table:
🟢 ON — feature is fully enabled across all relevant resources in scope🟡 PARTIAL — some resources have it, some don't (or partial config like liveness-only)🔴 OFF — feature is missing on all relevant resourcesOFF with the current SKU when relevant (🔴 LRS, 🔴 GRS, 🟢 ZRS, 🟢 GZRS). When no SKU is set in IaC, label as 🔴 GRS (ARM/AVM default) and note that in the resource line.(FC1), (defaulted; no SKU set), liveness only, needs code change (FC1)).— already ON so the user sees credit for what's right.n/a, —, or empty cells. If a feature doesn't apply to any resource in scope, drop the row.UX Note: If the assessment finds the app already has all core reliability features (zone redundancy, ZRS/GZRS storage, health probes), skip the fix-it question and jump straight to Configuration Workflow Step 3 (Multi-region follow-up). Do NOT start any multi-region work without explicit consent.
When user wants to fix findings from the assessment:
⛔ ALWAYS confirm with user before executing changes. Show what will change, any cost implications, and any destructive actions (e.g., environment recreation).
After assessment, if user says "fix it" / "improve my reliability" / "enable zone redundancy":
I'll start with the quick wins (no downtime, fast):
1. ✏️ Enable zone redundancy on plan-ii5trxva2ark4 (Flex Consumption — no cost change)
2. ✏️ Set health check path to /api/health on func-api-ii5trxva2ark4
Then, separately, I'll ask if you want to upgrade storage:
3. 🕒 Upgrade stii5trxva2ark4 from LRS → ZRS (small cost increase, migration takes hours)
— Required for full zone redundancy, but I'll confirm with you before starting.
How would you like to apply these changes?
A) Fix now — Run az CLI commands against your live resources (immediate, one-time)
B) Patch my IaC — Update your Bicep/Terraform files so changes persist across deploys
(If you use azd or Terraform, option B is recommended so `azd up` won't overwrite changes.)
Run fixes against live resources using az CLI commands. Quick wins first, then ask before the slow storage migration.
The exact CLI commands per service live in the per-service references — pick the one(s) matching the resources discovered in Phase 2:
| Fix | Reference | |---|---| | Enable zone redundancy / configure health probes (Functions) | references/services/functions/reliability.md | | Enable zone redundancy / configure health probes (App Service) | references/services/app-service/reliability.md | | Upgrade storage replication (cross-service) | references/configure-storage.md | | Set up multi-region (cross-service) | references/configure-multi-region.md | | Platform overview / verification | references/configure-zone-redundancy.md, references/configure-health-probes.md |
Execution order — always quick wins first:
Zone redundancy on compute (fast, in-place property update on the App's plan).
Health probes (Premium / Dedicated only — in-place; for FC1 / Consumption, follow the consent gate in configure-health-probes.md).
Verify the compute changes succeeded before doing anything else.
⛔ STOP — Ask about storage upgrade. Compute is now zone-redundant, but storage may still be LRS or GRS. Ask the user explicitly:
✅ Compute is now zone-redundant.
To be **fully zone-redundant**, your storage account also needs to be upgraded:
• stii5trxva2ark4: currently `Standard_LRS` → needs `Standard_ZRS`
⚠️ This is a live storage redundancy conversion:
• Takes hours to days depending on data volume
• Small ongoing cost increase (~$0.01/GB/month more)
• Only supported for Standard general-purpose v2 accounts
Do you want me to start the storage migration now? (yes / no / later)
az storage account update --sku Standard_ZRS (or migration start if needed); poll az storage account show --query sku.name until it reports Standard_ZRS.Multi-region — do NOT auto-run. Handled in Step 3 below as an explicit follow-up after re-assessment.
⚠️ Warning: If the user uses
azd uporterraform applylater, CLI-only changes may be overwritten by the IaC definitions. Recommend also patching IaC after CLI fixes.
Update the user's Bicep or Terraform files so reliability settings are persistent.
Step 1: Detect IaC type
infra/ folder in project root*.bicep or *.tf files*.bicep files → use Bicep patching*.tf files → use Terraform patchingStep 2: Classify each fix by risk level
| Fix | Risk Level | What Happens |
|-----|-----------|--------------|
| Zone redundancy (App plan) | 🟢 Safe patch | In-place property update on next deploy |
| Storage LRS → ZRS | 🟡 Pre-migration required | Live storage migration must complete before the IaC SKU change can deploy. Never bundle with safe patches — use the two-deploy flow in Steps 3–5. |
| Health check path (Basic/Standard/Premium / Dedicated) | 🟢 Safe patch | In-place update, but causes app restart |
| Health check path (FC1 / Consumption) | ⚪ Code-only — ask first | healthCheckPath is unsupported. Adding a health endpoint requires adding an HTTP-triggered /api/health function to app code. Always ask the user for explicit consent before touching source code. Do not patch IaC. |
Step 3: Apply patches in two deploys (quick wins first)
The IaC patching framework (detection, AVM-module guidance, deploy-order rule, storage SKU patch) lives in:
| IaC Type | Framework reference | |---|---| | Bicep | references/iac-patching-bicep.md | | Terraform | references/iac-patching-terraform.md |
The actual per-service compute patches (Function App plan ZR, App Service Plan ZR, etc.) live in the per-service references — load the matching service file from Phase 2 for the exact Bicep / Terraform / AVM snippets. Only Azure Functions and App Service have per-service references in this skill version; Container Apps is out of scope.
Deploy 1 — Quick wins only. Patch the 🟢 Safe items (zone redundancy on the App Service/Function App plan, health probes on Basic/Standard/Premium / Dedicated). Do NOT include the storage SKU patch in this deploy.
After patching, the skill runs the deploy itself (do not stop and tell the user to run it). Detect the deployment tool and confirm once before executing:
📦 Patches applied to your IaC. Ready to deploy:
Tool detected: azd (found azure.yaml)
Command: azd up
Proceed with deployment? (yes / no)
On yes, run the appropriate command, stream output back to the user, and continue to the next step on success:
azure.yaml): azd upaz deployment group create --resource-group <rg> --template-file infra/main.bicep --parameters @infra/main.parameters.jsonterraform plan -out tfplan → (show plan summary) → terraform apply tfplanOn no, stop and report the patched files; do not proceed to Step 4 / Re-Assess.
If deployment fails, surface the error and stop — do not continue to the storage step.
⛔ STOP — Ask about storage upgrade before Deploy 2. After Deploy 1 succeeds, ask the user explicitly:
✅ Quick-win patches deployed. Compute is now zone-redundant.
To be **fully zone-redundant**, your storage account also needs to be upgraded:
• stii5trxva2ark4: currently `Standard_LRS` → needs `Standard_ZRS`
⚠️ This is a two-part change:
1. Live storage migration (`az storage account migration start`) — takes hours to days
2. A second deploy to update your IaC's storage SKU to match
Do you want me to start the storage migration now? (yes / no / later)
Step 4: Storage migration (only if user said yes in Step 3)
The skill runs these commands itself — do not ask the user to run them. Show progress as you go:
🔄 Starting storage migration (this can take up to 72 hours)...
az storage account migration start --name stii5trxva2ark4 \
--resource-group rg-example --sku Standard_ZRS --no-wait
Polling: az storage account show --name stii5trxva2ark4 --query sku.name
...
✅ Migration complete: sku.name = Standard_ZRS
For very long migrations, you may surface a checkpoint to the user ("this is still running, check back later") rather than blocking the entire conversation.
Step 5: Deploy 2 — storage SKU patch
After the migration completes, the skill patches the storage SKU in IaC and runs the same deploy command as Step 3 (e.g. azd up). This deploy is a no-op confirmation that the IaC matches the live state. Confirm once with the user before executing, then run it directly.
After changes are applied (CLI) or deployed (IaC), automatically re-run the assessment and show the same feature-pivoted table as Phase 3, with each feature row's status updated to reflect the new state. Briefly call out what changed since the previous run.
🔄 Reliability Re-Assessment — rg-eventhubs-python-jan13 (eastus)
───────────────────────────────────────────────────────────────────────────────────────
Reliability Feature Status Resources
───────────────────────────────────────────────────────────────────────────────────────
Zone redundancy — compute 🟢 ON • plan-ii5trxva2ark4 (FC1) — now ON
• plan-web-ii5trxva2ark4 (P1v3) — now ON
Zone-redundant storage 🟢 ZRS • stii5trxva2ark4 — GRS → ZRS
Health probes 🟡 PARTIAL • func-api-ii5trxva2ark4 — still off (FC1, code change declined)
• app-web-ii5trxva2ark4 — now ON
Multi-region failover 🔴 OFF • Single region (eastus) only
───────────────────────────────────────────────────────────────────────────────────────
What changed: Function App and App Service plan zone redundancy, storage replication and health probes on App Service.
(Multi-region offered next — see Step 3.)
Multi-region is a significant cost/complexity step. Do NOT start it automatically. After re-assessment, only if all core single-region reliability features are 🟢 ON (zone-redundant compute, ZRS/GZRS storage, health probes), explicitly ask the user and wait for their response before doing anything:
🟢 Your app is now fully zone-redundant in {region}.
The next step (optional) is multi-region failover with Azure Front Door:
• Deploys compute + storage in a second region (paired region recommended)
• Adds Azure Front Door for global load balancing with health-probe-driven failover
• Protects against full region outages
• Estimated additional cost: ~2x compute (active-passive); Front Door ~$35/month base
Do you want me to set up multi-region failover now? (yes / no / later)
📦 Multi-region IaC generated. Ready to deploy with \azd up`. Proceed? (yes / no)`azd up / az deployment group create / terraform apply) and streams output. Do not stop and tell the user to run it.⛔ Do not skip the wait. Do not generate multi-region IaC, deploy a Front Door, or modify any files until the user has explicitly said yes. If core reliability is not yet all 🟢, do not ask about multi-region — finish the core gaps first.
| Priority | Criteria | Action | |---|---|---| | Critical | No zone redundancy AND production workload | Fix immediately | | High | LRS storage on zone-redundant compute | Fix within days | | Medium | No multi-region (single region but zone-redundant) | Plan for next sprint | | Low | Missing health probes or monitoring gaps | Track and fix |
| Error | Message | Remediation |
|---|---|---|
| Authentication required | "Please login" | Run az login and retry |
| Access denied | "Forbidden" | Confirm Reader/Contributor role assignment |
| Plan doesn't support ZR | "Upgrade required" | Inform user of plan upgrade path + cost delta |
| Region doesn't support AZ | "Region limitation" | Suggest supported regions |
| Action | This skill does | Hand off to |
|---|---|---|
| Assess reliability posture | ✅ Yes | — |
| Recommend improvements | ✅ Yes | — |
| Enable zone redundancy (CLI commands) | ✅ Yes | — |
| Patch Bicep/Terraform for reliability | ✅ Yes | — |
| Generate multi-region IaC | ✅ Yes (additions for the secondary region + Front Door) | azure-prepare for full new-app IaC scaffolding |
| Deploy IaC for reliability changes | ✅ Yes (runs azd up / terraform apply / az deployment itself, after user confirmation) | azure-deploy for general/non-reliability deploys |
| Validate pre-deployment | Reliability checks only | azure-validate for full validation |
tools
Deploy, evaluate, fine-tune, and manage Foundry agents end-to-end: Docker build, ACR push, hosted/prompt agent create, batch eval, continuous eval, prompt optimizer, Agent Optimizer scaffold, agent.yaml, dataset curation from traces, model fine-tuning (SFT/DPO/RFT). USE FOR: deploy agent, hosted agent, create agent, add tool to agent, invoke agent, evaluate agent, continuous eval, continuous monitoring, optimize prompt, improve prompt, optimize agent instructions, agent optimizer, deploy model, Foundry project, RBAC, role assignment, permissions, quota, capacity, region, troubleshoot agent, deployment failure, AI Services, create Foundry resource, provision, knowledge index, customize deployment, onboard, availability, fine-tune, SFT, DPO, RFT, training-data, grader, distillation, fine-tuned model, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure-prepare).
testing
Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.
testing
Azure cost management: query costs, forecast spending, optimize to reduce waste. WHEN: "Azure costs", "Azure bill", "cost breakdown", "how much am I spending", "forecast spending", "optimize costs", "reduce spending", "orphaned resources", "rightsize VMs", "cost spike", "reduce storage costs", "AKS cost". DO NOT USE FOR: deploying resources, provisioning, diagnostics, or security audits.
development
Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).