microsoftlearning/trainer-demo-deploy/az-azure-validate
Claude Code and agent skill by microsoftlearning/trainer-demo-deploy
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Pre-deployment and post-deployment validation patterns for Azure infrastructure. Covers authentication, template linting, what-if analysis, resource provider checks, and health verification.
Install
npx vskill@latest install microsoftlearning/trainer-demo-deploy/az-azure-validateSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as microsoftlearning/trainer-demo-deploy/az-azure-validate.
Azure Validate Skill
Pre-deployment and post-deployment validation gates that ensure Azure infrastructure is ready for deployment and correctly provisioned afterward. Used by the Deploy agent as hard gates before executing any deployment.
1. Pre-Deployment Validation Gates
All gates must pass before deployment proceeds. Each gate is a hard stop — failure means the deployment cannot continue until the issue is resolved.
[!CAUTION]GATE FAILURE POLICY: If a gate fails and cannot be auto-remediated,present the failure to the user and ask how to proceed.Do NOT autonomously skip deployment or generate a dry-run summary.The user must explicitly decide whether to:1. Fix the issue and retry2. Skip the gate (accepting risk)3. Abort the deployment
Gate Sequence
2. Gate 1 — Authentication Check
Azure CLI
Azure Developer CLI
Expected Output
| Field | Check | |
|---|---|---|
user.name or user.type | Non-empty; matches expected identity | |
tenantId | Matches the target tenant | |
state | Enabled |
[!WARNING]Service principal authentication (user.type: "servicePrincipal") may haverestricted permissions compared to interactive login. Verify RBAC before proceeding.
3. Gate 2 — Subscription Context
Verify Correct Subscription
Switch Subscription (If Needed)
Validation Checks
| Check | Command | Expected | |
|---|---|---|---|
| Subscription state | az account show --query "state" -o tsv | Enabled | |
| Spending limit | az account show --query "spendingLimit" -o tsv | Not On for production | |
| Subscription ID matches env | Compare az account show --query "id" with azd env get-values | Match |
[!IMPORTANT]Always confirm the subscription before deploying. Deploying to the wrong subscriptionis the most common and costly mistake in demo environments.
4. Gate 3 — Template Validation
Bicep Build (Syntax Check)
A successful bicep build produces no output. Any output indicates errors.
Bicep Lint (Best Practice Check)
Linting checks against bicepconfig.json rules. Common lint warnings:
| Rule | Severity | Meaning | |
|---|---|---|---|
no-unused-params | Warning | Parameter defined but not used | |
no-unused-vars | Warning | Variable defined but not used | |
secure-parameter-default | Error | Secure param has a default value | |
adminusername-should-not-be-literal | Warning | Admin username is hardcoded | |
no-hardcoded-env-urls | Warning | Uses management.azure.com instead of environment() |
ARM Template Validation API
This calls the ARM validation endpoint which checks:
- Template schema validity
- Parameter type correctness
- Resource API version availability
- Cross-resource reference resolution
5. Gate 4 — Parameter Validation
Check Required Parameters
Verify .bicepparam File
Common Parameter Issues
| Issue | Symptom | Fix | |
|---|---|---|---|
| Missing required parameter | The parameter 'X' is required | Add to .bicepparam file | |
| Wrong type | Expected type 'string', got 'int' | Correct the value type | |
| Invalid allowed value | Not in allowed values list | Check @allowed() decorator | |
| Secure param in plain text | Lint error | Use Key Vault reference or @secure() |
6. Gate 5 — Resource Provider Registration
Check Required Providers
Every Azure service requires its resource provider to be registered in the subscription.
Register Missing Providers
Common Resource Providers by Service
| Azure Service | Resource Provider | |
|---|---|---|
| App Service / Functions | Microsoft.Web | |
| Service Bus | Microsoft.ServiceBus | |
| Key Vault | Microsoft.KeyVault | |
| Storage | Microsoft.Storage | |
| Log Analytics | Microsoft.OperationalInsights | |
| Application Insights | Microsoft.Insights | |
| Container Apps | Microsoft.App | |
| Managed Identity | Microsoft.ManagedIdentity | |
| Role Assignments | Microsoft.Authorization | |
| Cosmos DB | Microsoft.DocumentDB | |
| SQL Server | Microsoft.Sql | |
| Event Hubs | Microsoft.EventHub | |
| API Management | Microsoft.ApiManagement | |
| Cognitive Services | Microsoft.CognitiveServices |
7. Gate 6 — What-If Analysis
Run What-If
What-If Validation Criteria
| Check | Pass Criteria | |
|---|---|---|
No unexpected Delete operations | Zero resources being deleted (unless intentional) | |
| Resource count matches plan | Number of Create operations aligns with 04-implementation-plan.md | |
No Error status resources | All resources can be evaluated | |
| Region correctness | Resources deploy to the expected region |
Automated What-If Parsing
8. Post-Deployment Validation
Resource Provisioning State
All resources must reach Succeeded state:
Deployment Output Capture
Connectivity Validation
9. Validation Report Format
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/az-azure-validate/SKILL.md
Popularity
- Repository stars
- 31
- Repository forks
- 26
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoftlearning/trainer-demo-deploy/az-azure-validate)