{"id":"cda4244f-75f0-4727-acf9-ce3750e185cc","shortId":"dFvKKZ","kind":"skill","title":"azure-deployment-preflight","tagline":"Performs comprehensive preflight validation of Bicep deployments to Azure, including template syntax validation, what-if analysis, and permission checks. Use this skill before any deployment to Azure to preview changes, identify potential issues, and ensure the deployment will su","description":"# Azure Deployment Preflight Validation\n\nThis skill validates Bicep deployments before execution, supporting both Azure CLI (`az`) and Azure Developer CLI (`azd`) workflows.\n\n## When to Use This Skill\n\n- Before deploying infrastructure to Azure\n- When preparing or reviewing Bicep files\n- To preview what changes a deployment will make\n- To verify permissions are sufficient for deployment\n- Before running `azd up`, `azd provision`, or `az deployment` commands\n\n## Validation Process\n\nFollow these steps in order. Continue to the next step even if a previous step fails—capture all issues in the final report.\n\n### Step 1: Detect Project Type\n\nDetermine the deployment workflow by checking for project indicators:\n\n1. **Check for azd project**: Look for `azure.yaml` in the project root\n   - If found → Use **azd workflow**\n   - If not found → Use **az CLI workflow**\n\n2. **Locate Bicep files**: Find all `.bicep` files to validate\n   - For azd projects: Check `infra/` directory first, then project root\n   - For standalone: Use the file specified by the user or search common locations (`infra/`, `deploy/`, project root)\n\n3. **Auto-detect parameter files**: For each Bicep file, look for matching parameter files:\n   - `<filename>.bicepparam` (Bicep parameters - preferred)\n   - `<filename>.parameters.json` (JSON parameters)\n   - `parameters.json` or `parameters/<env>.json` in same directory\n\n### Step 2: Validate Bicep Syntax\n\nRun Bicep CLI to check template syntax before attempting deployment validation:\n\n```bash\nbicep build <bicep-file> --stdout\n```\n\n**What to capture:**\n- Syntax errors with line/column numbers\n- Warning messages\n- Build success/failure status\n\n**If Bicep CLI is not installed:**\n- Note the issue in the report\n- Continue to Step 3 (Azure will validate syntax during what-if)\n\n### Step 3: Run Preflight Validation\n\nChoose the appropriate validation based on project type detected in Step 1.\n\n#### For azd Projects (azure.yaml exists)\n\nUse `azd provision --preview` to validate the deployment:\n\n```bash\nazd provision --preview\n```\n\nIf an environment is specified or multiple environments exist:\n```bash\nazd provision --preview --environment <env-name>\n```\n\n#### For Standalone Bicep (no azure.yaml)\n\nDetermine the deployment scope from the Bicep file's `targetScope` declaration:\n\n| Target Scope | Command |\n|--------------|---------|\n| `resourceGroup` (default) | `az deployment group what-if` |\n| `subscription` | `az deployment sub what-if` |\n| `managementGroup` | `az deployment mg what-if` |\n| `tenant` | `az deployment tenant what-if` |\n\n**Run with Provider validation level first:**\n\n```bash\n# Resource Group scope (most common)\naz deployment group what-if \\\n  --resource-group <rg-name> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n\n# Subscription scope\naz deployment sub what-if \\\n  --location <location> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n\n# Management Group scope\naz deployment mg what-if \\\n  --location <location> \\\n  --management-group-id <mg-id> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n\n# Tenant scope\naz deployment tenant what-if \\\n  --location <location> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n```\n\n**Fallback Strategy:**\n\nIf `--validation-level Provider` fails with permission errors (RBAC), retry with `ProviderNoRbac`:\n\n```bash\naz deployment group what-if \\\n  --resource-group <rg-name> \\\n  --template-file <bicep-file> \\\n  --validation-level ProviderNoRbac\n```\n\nNote the fallback in the report—the user may lack full deployment permissions.\n\n### Step 4: Capture What-If Results\n\nParse the what-if output to categorize resource changes:\n\n| Change Type | Symbol | Meaning |\n|-------------|--------|---------|\n| Create | `+` | New resource will be created |\n| Delete | `-` | Resource will be deleted |\n| Modify | `~` | Resource properties will change |\n| NoChange | `=` | Resource unchanged |\n| Ignore | `*` | Resource not analyzed (limits reached) |\n| Deploy | `!` | Resource will be deployed (changes unknown) |\n\nFor modified resources, capture the specific property changes.\n\n### Step 5: Generate Report\n\nCreate a Markdown report file in the **project root** named:\n- `preflight-report.md`\n\nUse the template structure from [references/REPORT-TEMPLATE.md](references/REPORT-TEMPLATE.md).\n\n**Report sections:**\n1. **Summary** - Overall status, timestamp, files validated, target scope\n2. **Tools Executed** - Commands run, versions, validation levels used\n3. **Issues** - All errors and warnings with severity and remediation\n4. **What-If Results** - Resources to create/modify/delete/unchanged\n5. **Recommendations** - Actionable next steps\n\n## Required Information\n\nBefore running validation, gather:\n\n| Information | Required For | How to Obtain |\n|-------------|--------------|---------------|\n| Resource Group | `az deployment group` | Ask user or check existing `.azure/` config |\n| Subscription | All deployments | `az account show` or ask user |\n| Location | Sub/MG/Tenant scope | Ask user or use default from config |\n| Environment | azd projects | `azd env list` or ask user |\n\nIf required information is missing, prompt the user before proceeding.\n\n## Error Handling\n\nSee [references/ERROR-HANDLING.md](references/ERROR-HANDLING.md) for detailed error handling guidance.\n\n**Key principle:** Continue validation even when errors occur. Capture all issues in the final report.\n\n| Error Type | Action |\n|------------|--------|\n| Not logged in | Note in report, suggest `az login` or `azd auth login` |\n| Permission denied | Fall back to `ProviderNoRbac`, note in report |\n| Bicep syntax error | Include all errors, continue to other files |\n| Tool not installed | Note in report, skip that validation step |\n| Resource group not found | Note in report, suggest creating it |\n\n## Tool Requirements\n\nThis skill uses the following tools:\n\n- **Azure CLI** (`az`) - Version 2.76.0+ recommended for `--validation-level`\n- **Azure Developer CLI** (`azd`) - For projects with `azure.yaml`\n- **Bicep CLI** (`bicep`) - For syntax validation\n- **Azure MCP Tools** - For documentation lookups and best practices\n\nCheck tool availability before starting:\n```bash\naz --version\nazd version\nbicep --version\n```\n\n## Example Workflow\n\n1. User: \"Validate my Bicep deployment before I run it\"\n2. Agent detects `azure.yaml` → azd project\n3. Agent finds `infra/main.bicep` and `infra/main.bicepparam`\n4. Agent runs `bicep build infra/main.bicep --stdout`\n5. Agent runs `azd provision --preview`\n6. Agent generates `preflight-report.md` in project root\n7. Agent summarizes findings to user\n\n## Reference Documentation\n\n- [Validation Commands Reference](references/VALIDATION-COMMANDS.md)\n- [Report Template](references/REPORT-TEMPLATE.md)\n- [Error Handling Guide](references/ERROR-HANDLING.md)","tags":["azure","deployment","preflight","awesome","copilot","github","agent-skills","agents","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"capabilities":["skill","source-github","skill-azure-deployment-preflight","topic-agent-skills","topic-agents","topic-awesome","topic-custom-agents","topic-github-copilot","topic-hacktoberfest","topic-prompt-engineering"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/azure-deployment-preflight","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add github/awesome-copilot","source_repo":"https://github.com/github/awesome-copilot","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 33270 github stars · SKILL.md body (6,946 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:05.662Z","embedding":null,"createdAt":"2026-04-18T20:25:32.958Z","updatedAt":"2026-05-18T18:52:05.662Z","lastSeenAt":"2026-05-18T18:52:05.662Z","tsv":"'1':134,147,310,605,843 '2':171,238,614,853 '2.76.0':800 '3':208,285,295,623,859 '4':521,633,865 '5':582,641,872 '6':878 '7':885 'account':674 'action':643,735 'agent':854,860,866,873,879,886 'analysi':21 'analyz':563 'appropri':301 'ask':663,677,682,696 'attempt':250 'auth':747 'auto':210 'auto-detect':209 'avail':831 'az':60,105,168,363,370,377,384,402,421,439,460,491,660,673,743,798,835 'azd':65,100,102,150,162,182,312,317,325,338,690,692,746,809,837,857,875 'azur':2,13,32,45,58,62,76,286,668,796,806,820 'azure-deployment-preflight':1 'azure.yaml':154,314,346,813,856 'back':752 'base':303 'bash':253,324,337,396,490,834 'best':827 'bicep':10,52,81,173,177,216,224,240,243,254,271,344,353,758,814,816,839,847,868 'bicepparam':223 'build':255,267,869 'captur':126,259,522,576,726 'categor':534 'chang':35,86,536,537,556,571,580 'check':24,143,148,184,246,666,829 'choos':299 'cli':59,64,169,244,272,797,808,815 'command':107,360,617,894 'common':202,401 'comprehens':6 'config':669,688 'continu':115,282,720,764 'creat':541,546,585,786 'create/modify/delete/unchanged':640 'declar':357 'default':362,686 'delet':547,551 'deni':750 'deploy':3,11,30,42,46,53,73,88,97,106,140,205,251,323,349,364,371,378,385,403,422,440,461,492,518,566,570,661,672,848 'detail':714 'detect':135,211,307,855 'determin':138,347 'develop':63,807 'directori':186,236 'document':824,892 'ensur':40 'env':693 'environ':330,335,341,689 'error':261,485,626,708,715,724,733,760,763,900 'even':120,722 'exampl':841 'execut':55,616 'exist':315,336,667 'fail':125,482 'fall':751 'fallback':475,509 'file':82,174,178,195,213,217,222,354,413,430,452,469,502,589,610,767 'final':131,731 'find':175,861,888 'first':187,395 'follow':110,794 'found':160,166,781 'full':517 'gather':651 'generat':583,880 'group':365,398,404,410,437,448,493,499,659,662,779 'guid':902 'guidanc':717 'handl':709,716,901 'id':449 'identifi':36 'ignor':560 'includ':14,761 'indic':146 'inform':647,652,700 'infra':185,204 'infra/main.bicep':862,870 'infra/main.bicepparam':864 'infrastructur':74 'instal':275,770 'issu':38,128,278,624,728 'json':228,233 'key':718 'lack':516 'level':394,417,434,456,473,480,505,621,805 'limit':564 'line/column':263 'list':694 'locat':172,203,427,445,466,679 'log':737 'login':744,748 'look':152,218 'lookup':825 'make':90 'manag':436,447 'management-group-id':446 'managementgroup':376 'markdown':587 'match':220 'may':515 'mcp':821 'mean':540 'messag':266 'mg':379,441 'miss':702 'modifi':552,574 'multipl':334 'name':594 'new':542 'next':118,644 'nochang':557 'note':276,507,739,755,771,782 'number':264 'obtain':657 'occur':725 'order':114 'output':532 'overal':607 'paramet':212,221,225,229,232,414,431,453,470 'parameters.json':227,230 'pars':527 'perform':5 'permiss':23,93,484,519,749 'potenti':37 'practic':828 'prefer':226 'preflight':4,7,47,297 'preflight-report.md':595,881 'prepar':78 'preview':34,84,319,327,340,877 'previous':123 'principl':719 'proceed':707 'process':109 'project':136,145,151,157,183,189,206,305,313,592,691,811,858,883 'prompt':703 'properti':554,579 'provid':392,418,435,457,474,481 'providernorbac':489,506,754 'provis':103,318,326,339,876 'rbac':486 'reach':565 'recommend':642,801 'refer':891,895 'references/error-handling.md':711,712,903 'references/report-template.md':601,602,899 'references/validation-commands.md':896 'remedi':632 'report':132,281,512,584,588,603,732,741,757,773,784,897 'requir':646,653,699,789 'resourc':397,409,498,535,543,548,553,558,561,567,575,638,658,778 'resource-group':408,497 'resourcegroup':361 'result':526,637 'retri':487 'review':80 'root':158,190,207,593,884 'run':99,242,296,390,618,649,851,867,874 'scope':350,359,399,420,438,459,613,681 'search':201 'section':604 'see':710 'sever':630 'show':675 'skill':27,50,71,791 'skill-azure-deployment-preflight' 'skip':774 'source-github' 'specif':578 'specifi':196,332 'standalon':192,343 'start':833 'status':269,608 'stdout':256,871 'step':112,119,124,133,237,284,294,309,520,581,645,777 'strategi':476 'structur':599 'su':44 'sub':372,423 'sub/mg/tenant':680 'subscript':369,419,670 'success/failure':268 'suffici':95 'suggest':742,785 'summar':887 'summari':606 'support':56 'symbol':539 'syntax':16,241,248,260,289,759,818 'target':358,612 'targetscop':356 'templat':15,247,412,429,451,468,501,598,898 'template-fil':411,428,450,467,500 'tenant':383,386,458,462 'timestamp':609 'tool':615,768,788,795,822,830 'topic-agent-skills' 'topic-agents' 'topic-awesome' 'topic-custom-agents' 'topic-github-copilot' 'topic-hacktoberfest' 'topic-prompt-engineering' 'type':137,306,538,734 'unchang':559 'unknown':572 'use':25,69,161,167,193,316,596,622,685,792 'user':199,514,664,678,683,697,705,844,890 'valid':8,17,48,51,108,180,239,252,288,298,302,321,393,416,433,455,472,479,504,611,620,650,721,776,804,819,845,893 'validation-level':415,432,454,471,478,503,803 'verifi':92 'version':619,799,836,838,840 'warn':265,628 'what-if':18,291,366,373,380,387,405,424,442,463,494,523,529,634 'workflow':66,141,163,170,842","prices":[{"id":"ed112d91-7a2d-4eca-8cb1-2464674cf40b","listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:32.958Z"}],"sources":[{"listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","source":"github","sourceId":"github/awesome-copilot/azure-deployment-preflight","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/azure-deployment-preflight","isPrimary":false,"firstSeenAt":"2026-04-18T21:48:23.396Z","lastSeenAt":"2026-05-18T18:52:05.662Z"},{"listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","source":"skills_sh","sourceId":"github/awesome-copilot/azure-deployment-preflight","sourceUrl":"https://skills.sh/github/awesome-copilot/azure-deployment-preflight","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:32.958Z","lastSeenAt":"2026-05-07T22:40:17.537Z"}],"details":{"listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"azure-deployment-preflight","github":{"repo":"github/awesome-copilot","stars":33270,"topics":["agent-skills","agents","ai","awesome","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"license":"mit","html_url":"https://github.com/github/awesome-copilot","pushed_at":"2026-05-18T01:26:59Z","description":"Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.","skill_md_sha":"2a44dd5d7620dab51e4ae44efd30117c8722d971","skill_md_path":"skills/azure-deployment-preflight/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/github/awesome-copilot/tree/main/skills/azure-deployment-preflight"},"layout":"multi","source":"github","category":"awesome-copilot","frontmatter":{"name":"azure-deployment-preflight","description":"Performs comprehensive preflight validation of Bicep deployments to Azure, including template syntax validation, what-if analysis, and permission checks. Use this skill before any deployment to Azure to preview changes, identify potential issues, and ensure the deployment will succeed. Activate when users mention deploying to Azure, validating Bicep files, checking deployment permissions, previewing infrastructure changes, running what-if, or preparing for azd provision."},"skills_sh_url":"https://skills.sh/github/awesome-copilot/azure-deployment-preflight"},"updatedAt":"2026-05-18T18:52:05.662Z"}}