All skills
microsoft avatar

/azure-prepare

@7995851 official

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.

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/azure-prepare

This session only. Nothing lands on disk.

referencesanalyze.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Analyze Workspace

⛔ MANDATORY FIRST — Specialized Technology Delegation

STOP. Before choosing a mode, check the user's prompt for specialized technology keywords. If matched, invoke the corresponding skill immediately — it has tested templates and correct SDK usage.

⚠️ Re-entry guard: If azure-prepare was invoked as a resume from a specialized skill, skip this check and go directly to Step 4.

User prompt mentions Action
Azure Functions, function app, serverless function, timer trigger, func new Stay in azure-prepare. When selecting compute, prefer Azure Functions templates and best practices, then continue from Step 4.

⚠️ Check the user's prompt text — not just existing code. This is critical for greenfield projects with no codebase. See full routing table.

If no match, continue below.


Three Modes — Always Choose One

⛔ IMPORTANT: Always go through one of these three paths. Having azure.yaml does NOT mean you skip to validate — the user may want to modify or extend the app.

Mode When to Use
NEW Empty workspace, or user wants to create a new app
MODIFY Existing Azure app, user wants to add features/components
MODERNIZE Existing non-Azure app, user wants to migrate to Azure

Decision Tree

What does the user want to do?
│
├── Create new application → Mode: NEW
│
├── Add/change features to existing app
│   ├── Has azure.yaml/infra? → Mode: MODIFY
│   └── No Azure config? → Mode: MODERNIZE (add Azure support first)
│
└── Migrate/modernize for Azure
    ├── Cross-cloud migration (AWS/GCP/Lambda)? → **Invoke azure-cloud-migrate skill** (do NOT continue in azure-prepare)
    └── On-prem or generic modernization → Mode: MODERNIZE

Mode: NEW

Creating a new Azure application from scratch.

Actions:

  1. Confirm project type with user
  2. Gather requirements → requirements.md
  3. Select technology stack
  4. Update plan

Mode: MODIFY

Adding components/services to an existing Azure application.

Actions:

  1. Scan existing codebase → scan.md
  2. Identify existing Azure configuration
  3. Gather requirements for new components
  4. Update plan

Mode: MODERNIZE

Converting an existing application to run on Azure.

Actions:

  1. Full codebase scan → scan.md
  2. Analyze existing infrastructure (Docker, CI/CD, etc.)
  3. Gather requirements → requirements.md
  4. Map existing components to Azure services
  5. Update plan

Detection Signals

Signal Indicates
azure.yaml exists AZD project (MODIFY mode likely)
infra/*.bicep exists Bicep IaC
infra/*.tf exists Terraform IaC
Dockerfile exists Containerized app
No Azure files NEW or MODERNIZE mode

⛔ MANDATORY for Azure Functions: Load Composition Rules BEFORE Execution

If the target compute is Azure Functions, you MUST load the composition algorithm before generating ANY infrastructure:

  1. Load services/functions/templates/selection.md — decision tree for base template + recipe
  2. Load services/functions/templates/recipes/composition.md — the exact algorithm to follow
  3. Use functions_template_get MCP tool to list and fetch templates and write functionFiles[] + projectFiles[] directly — NEVER hand-write Bicep/Terraform and use azd init -t <template>/func init/func new as fallback when composing multiple recipes and required templates are not found

⚠️ Critical: The Functions bicep.md and terraform.md files are REFERENCE DOCUMENTATION, not templates to copy. Hand-writing infrastructure from these patterns results in missing RBAC, incorrect managed identity configuration, and security vulnerabilities.

For other compute targets (Container Apps, App Service, Static Web Apps), load their respective README files in services/ for guidance.

Source: SKILL.md on GitHub

1 alert8d4 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The azure-prepare skill provides a comprehensive environment for preparing Azure applications for deployment. It focuses on generating infrastructure-as-code and deployment configuration while strictly enforcing security best practices like managed identity usage and secret management via Key Vault. No malicious patterns or security risks were identified.

  • Socket8d

    5 alerts: gptAnomaly, gptSecurity

  • Snyk8d

    Risk: LOW · No issues

  • Runlayer6mo

    68/196 files flagged

Signed by skilld at 7995851. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 weeks ago
metadata
{
  "author": "Microsoft",
  "version": "0.0.0-placeholder"
}
  • Infrastructure
  • azure
  • bicep
  • terraform
  • deployment
  • docker
  • functions
  • app-service

README badge

README badge for microsoft/github-copilot-for-azure/azure-prepare

Prepares Azure applications for deployment by generating infrastructure templates (Bicep or Terraform), azure.yaml configuration, and Dockerfiles. Covers new app creation, modernization, and hosting on App Service, Container Apps, or Functions—but excludes Python App Service deployments, copilot SDK apps, and cross-cloud migrations which have dedicated skills.

Generated from the current SKILL.md.

Does this skill handle Python App Service deployments?
No. Use the python-appservice-deploy skill instead for Python code-only App Service deploys.
Can I use this skill for cross-cloud migration?
No. This skill is for Azure-native preparation. Use azure-cloud-migrate for migrations from AWS, GCP, or other clouds.
Does this skill support Copilot SDK apps?
No. Use azure-hosted-copilot-sdk for apps with @github/copilot-sdk or CopilotClient.
What infrastructure templates does this skill support?
Azure Developer CLI (azd), Bicep, Terraform, and Azure CLI. The skill creates infrastructure code, Dockerfiles, and configuration files—actual deployment execution is handled by the azure-deploy skill.
Does this skill delete existing project files?
No. When adding features to existing projects, it modifies files rather than deletes them. It never removes the project or workspace directory itself.

Generated from the current SKILL.md. These answers refresh after source changes.