azure-prepare
π―Skillazure-prepare gets a new or existing app ready to deploy to Azure with azd, Microsoft's command-line tool for Azure. It first writes a plan for your approval, then creates the setup files.
Installation
npx skills add microsoft/azure-skills --skill azure-prepareRun it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).
Uses skills.sh Β· Node.js 22.20+
After installing
Ask for related work and the agent uses it on its own, or call it yourself.
/azure-prepareInstall by hand
Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.
Open the skill folder β- This project
.claude/skills/azure-prepare/ - All projects
~/.claude/skills/azure-prepare/
These paths are for Claude Code. For other tools, the command above puts it in the right place.
What this skill does
Overview
azure-prepare gets an app ready to deploy with the Azure Developer CLI (azd), Microsoft's command-line tool for Azure. Before it creates any files, it studies your project, asks about your needs, and writes every decision into .azure/deployment-plan.md. It only prepares files, and the azure-deploy skill runs the actual deployment.
Key Features
- Writes a deployment plan first and asks for your approval before it changes anything.
- Creates the
azure.yamlsettings file, infrastructure files in Bicep or Terraform (code that describes your cloud resources), and Dockerfiles (files that tell Docker how to package your app). - Sends special requests, such as Python on App Service or a move from AWS or GCP, to skills made for them.
- Sets up SQL Server to use only Microsoft Entra sign-in (Microsoft's account login), so no admin password is written into your files.
- Asks you to confirm the Azure subscription and region, and never deletes your project folder.
Who is this for?
It fits developers who want to put a new or existing app on Azure with azd, including Azure Functions, API Management, or long-running workflows. Use it before azure-validate and azure-deploy, which check and run the deployment.
Summarized by AI from this skill's SKILL.md. Suggest a better one
SKILL.md
View on GitHub βPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
Azure Prepare
AUTHORITATIVE GUIDANCE β MANDATORY COMPLIANCE
This document is the official, canonical source for preparing applications for Azure deployment. You MUST follow these instructions exactly as written unless they contradict security policies given to you. When in doubt, present the conflicting instructions from this document and ask the user for explicit confirmation. Do not improvise, infer, or substitute steps.
Triggers
Activate this skill when user wants to:
- Create a new application
- Add services or components to an existing app
- Make updates or changes to existing application
- Modernize or migrate an application
- Set up Azure infrastructure
- Deploy to Azure or host on Azure
- Create and deploy to Azure (including Terraform-based deployment requests)
Rules
- Plan first β MANDATORY β You MUST physically write an initial
.azure/deployment-plan.mdskeleton in the workspace root directory (not the session-state folder) as your very first action β before any code generation or execution begins. Write the skeleton immediately, then populate it progressively as Phase 1 analysis and research unfold; finalize it with all decisions at Phase 1 Step 6. This file must exist on disk throughout. azure-validate and azure-deploy depend on it and will fail without it. Do not skip or defer this step. - Get approval β Present plan to user before execution
- Research before generating β Load references and invoke related skills
- Update plan progressively β Mark steps complete as you go
- Validate before deploy β Invoke azure-validate before azure-deploy
- Confirm Azure context β Use
ask_userfor subscription and location per Azure Context - β Destructive actions require
ask_userβ Global Rules - β NEVER delete user project or workspace directories β When adding features to an existing project, MODIFY existing files.
azd init -t <template>is for NEW projects only; do NOT runazd init -tin an existing workspace. Plainazd init(without a template argument) may be used in existing workspaces when appropriate. File deletions within a project (e.g., removing build artifacts or temp files) are permitted when appropriate, but NEVER delete the user's project or workspace directory itself. See Global Rules. - Scope: preparation only β This skill generates infrastructure code and configuration files. Deployment execution (
azd up,azd deploy,terraform apply) is handled by the azure-deploy skill, which provides built-in error recovery and deployment verification. - β SQL Server Bicep: NEVER generate
administratorLoginoradministratorLoginPasswordβ not in direct properties, not in conditional/ternary branches, not anywhere in the file. Always use Entra-only authentication (azureADOnlyAuthentication: true) unconditionally. See references/services/sql-database/bicep.md. - Remove stale template IaC after conversion β If you converted Bicep templates from the selected
azdtemplate into Terraform templates, remove the Bicep templates that were introduced by thatazdtemplate and are now fully replaced by Terraform equivalents. Do not remove user-authored Bicep files. Only remove those template-provided Bicep files after the Terraform IaC is complete and Terraform has been selected as the deployment path. Before handing off to azure-validate skill, keep only the IaC templates required by the chosen deployment path.
β PLAN-FIRST WORKFLOW β MANDATORY
YOU MUST CREATE A PLAN BEFORE DOING ANY WORK
- STOP β Do not generate any code, infrastructure, or configuration yet
- CREATE SKELETON - Write an initial
.azure/deployment-plan.mdskeleton to disk immediately (before any code generation or execution begins), then populate it progressively as Phase 1 steps 1-5 reveal details; finalize it at Step 6- CONFIRM β Present the completed plan to the user and get approval
- EXECUTE β Only after approval, execute the plan step by step
The
.azure/deployment-plan.mdfile is the source of truth for this workflow and for azure-validate and azure-deploy skills. Without it, those skills will fail.β οΈ CRITICAL:
.azure/deployment-plan.mdmust be WRITTEN TO DISK inside the workspace root (e.g.,<workspace-root>/.azure/deployment-plan.md), not in the session-state folder. Use a file-write tool to create this file. This is the deployment plan artifact read by azure-validate and azure-deploy. You MUST create this file β do not proceed without it. β οΈ CRITICAL: You must create the file with the name.azure/deployment-plan.mdas is. You must not use other names such as.azure/plan.md.β Critical: Skipping the plan file creation will cause azure-validate and azure-deploy to fail. This requirement has no exceptions.
β STEP 0: Specialized Technology Check β MANDATORY FIRST ACTION
BEFORE starting Phase 1, check if the user's prompt OR workspace codebase matches a specialized technology that has a dedicated skill with tested templates. If matched, invoke that skill FIRST β then resume azure-prepare for validation and deployment.
Check 1: Prompt keywords
| Prompt keywords | Invoke FIRST |
|---|---|
| Python + App Service (e.g., "deploy Python to App Service", "Flask on Azure App Service", "publish Python web app to App Service") | python-appservice-deploy |
| Lambda, AWS Lambda, migrate AWS, migrate GCP, Lambda to Functions, migrate from AWS, migrate from GCP | azure-cloud-migrate |
| Azure Functions, function app, serverless function, timer trigger, HTTP trigger, func new | Stay in azure-prepare β prefer Azure Functions templates in Step 4; for plan choice/cold starts see hosting-plans.md and cold-start.md |
| APIM, API Management, API gateway, deploy APIM | Stay in azure-prepare β see APIM Deployment Guide |
| AI gateway, AI gateway policy, AI gateway backend, AI gateway configuration | azure-aigateway |
| workflow, orchestration, multi-step, pipeline, fan-out/fan-in, saga, long-running process, durable, order processing | Stay in azure-prepare β select durable recipe in Step 4. MUST load durable.md, DTS reference, and DTS Bicep patterns. |
β οΈ Check the user's prompt text β not just existing code. Critical for greenfield projects with no codebase to scan. See full routing table.
After the specialized skill completes, resume azure-prepare at Phase 1 Step 4 (Select Recipe) for remaining infrastructure, validation, and deployment.
Phase 1: Planning (BLOCKING β Complete Before Any Execution)
Create .azure/deployment-plan.md by completing these steps. Do NOT generate any artifacts until the plan is approved.
| # | Action | Reference |
|---|---|---|
| 0 | If the prompt matches a specialized technology with a dedicated skill, invoke that skill first | specialized-routing.md |
| 1 | Analyze Workspace β Determine mode: NEW, MODIFY, or MODERNIZE | analyze.md |
| 2 | Gather Requirements β Classification, scale, budget | requirements.md |
| 3 | Scan Codebase β Identify components, technologies, dependencies | scan.md |
| 4 | Select Recipe β Choose AZD (default), AZCLI, Bicep, or Terraform | recipe-selection.md |
| 5 | Plan Architecture β Select stack + map components to Azure services | architecture.md |
| 6 | Finalize Plan (MANDATORY) - Use a file-write tool to finalize .azure/deployment-plan.md with all decisions from steps 1-5. Update the skeleton written at the start of Phase 1 with the complete content. The file must be fully populated before you present the plan to the user. | plan-template.md |
| 7 | Present Plan β Show plan to user and ask for approval | .azure/deployment-plan.md |
| 8 | Destructive actions require ask_user | Global Rules |
β STOP HERE β Do NOT proceed to Phase 2 until the user approves the plan.
Phase 2: Execution (Only After Plan Approval)
Execute the approved plan. Update .azure/deployment-plan.md status after each step.
| # | Action | Reference |
|---|---|---|
| 1 | Research Components β Load service references + invoke related skills | research.md |
| 2 | Confirm Azure Context β Detect and confirm subscription + location and check the resource provisioning limit | Azure Context |
| 3 | Generate Artifacts β Create infrastructure and configuration files | generate.md |
| 4 | Harden Security β Apply security best practices | security.md |
| 5 | Functional Verification β Verify the app works (UI + backend), locally if possible | functional-verification.md |
| 6 | β Update Plan (MANDATORY before hand-off) β Use the edit tool to change the Status in .azure/deployment-plan.md to Ready for Validation. You MUST complete this edit BEFORE invoking azure-validate. Do NOT skip this step. | .azure/deployment-plan.md |
| 7 | β MANDATORY Hand Off β Invoke azure-validate skill. Your preparation work is done. Do NOT run azd up, azd deploy, or any deployment command directly β all deployment execution is handled by azure-deploy after azure-validate completes. PREREQUISITE: Step 6 must be completed first β .azure/deployment-plan.md status must say Ready for Validation. | β |
Outputs
| Artifact | Location |
|---|---|
| Plan | .azure/deployment-plan.md |
| Infrastructure | ./infra/ |
| AZD Config | azure.yaml (AZD only) |
| Dockerfiles | src/<component>/Dockerfile |
SDK Quick References
- Azure Developer CLI: azd
- Azure Identity: Python | .NET | TypeScript | Java
- App Configuration: Python | TypeScript | Java
Next
β MANDATORY NEXT STEP β DO NOT SKIP
After completing preparation, you MUST invoke azure-validate before any deployment attempt. Do NOT skip validation. Do NOT go directly to azure-deploy. Do NOT run
azd upor any deployment command directly. The workflow is:
azure-prepareβazure-validateβazure-deployβ BEFORE invoking azure-validate, you MUST use the
edittool to update.azure/deployment-plan.mdstatus toReady for Validation. If the plan status has not been updated, the validation will fail.This applies to ALL deployment scenarios including containerized apps, Container Apps, App Service, Azure Functions, static sites, and any other Azure target. No exceptions.
Skipping validation leads to deployment failures. Be patient and follow the complete workflow for the highest success outcome.
β Update plan status to Ready for Validation, then invoke azure-validate
More from this repository10
Helps you build, deploy, test, and manage AI agents and models on Microsoft Foundry, Microsoft's Azure service for AI. It guides the AI through each task with fixed steps.
Helps you find and fix problems in apps running on Azure, such as crashes, slow responses, or connection failures. It checks things in a set order and can work only from logs you provide.
azure-deploy puts your app on Azure after the azure-prepare and azure-validate skills have prepared and checked it. It runs the deployment, recovers from errors, and gives you the live web addresses.
azure-validate checks your Azure app before you deploy it, so you can catch setup and permission problems early. It runs after azure-prepare and before azure-deploy.
azure-resource-lookup finds and lists your Azure resources, such as web apps, virtual machines, and storage accounts, across your subscriptions. It only reads data and never changes anything.
azure-resource-visualizer draws a diagram of an Azure resource group that shows how each resource connects to the others. It saves the diagram and notes in a markdown file.
Lets Claude search and summarize large amounts of logs and app data stored in Azure Data Explorer. You ask what you want to know, and it writes and runs the queries for you.
Helps you send all requests to your AI models and tools through Azure API Management, so you can control cost, block harmful content and limit traffic. It includes Azure command-line steps for setup and testing.
Helps you find and fix errors in apps that send and receive messages through Azure Event Hubs or Service Bus. It checks service health and Microsoft docs to suggest a fix.
A helper that sends your Azure virtual machine requests to the right step-by-step guide. It helps you choose, price, create and reserve cloud servers in Azure.