Design, create, review, migrate, or troubleshoot Azure Developer CLI azd projects using azure.yaml, infra Bicep or Terraform, environments, secrets, hooks, deployment workflows, and azd-managed CI/CD. Use this skill when the user asks for azd project structure, Azure Developer CLI best practices, azd templates, or azure.yaml guidance.
Produce maintainable, secure, environment-aware azd projects by reading the repository manifest first, preserving the chosen IaC provider, and validating only the checks that apply.
When to invoke
"Review this azd project."
"Create or fix azure.yaml for this app."
"How should this Azure Developer CLI template be structured?"
"Troubleshoot azd provision, deploy, or pipeline config."
"Migrate this app to an azd template with Bicep or Terraform."
Prerequisites and context
Read azure.yaml before inferring services, paths, IaC provider, or deployment behavior.
Find the configured infra.path, source projects, deployment scripts, .gitignore, and pipeline definitions before editing.
Identify whether the task is create, migrate, review, deploy, or troubleshoot.
Identify the active environment only when an environment-specific operation is required.
Read bundled references on demand: references/project-structure.md, references/iac-and-environments.md, references/security-cicd-operations.md, and references/official-docs.md.
Safety guardrails
Guardrail
Rule
Local state
Never commit .azure, environment .env files, local Terraform state, generated deployment artifacts, or deployment outputs containing secrets.
Secrets
Never put literal secrets in azure.yaml, IaC parameter files, hooks, source control, logged command arguments, or IaC outputs.
Before resource-changing or cloud-changing commands, confirm environment, subscription, tenant, region, and expected scope.
User approval
Treat explicit deploy, provision, destroy, or pipeline requests as approval for that named action; otherwise ask before azd up, azd provision, azd deploy, azd down, or azd pipeline config.
Architecture
Do not replace Bicep with Terraform, Terraform with Bicep, or a hosting service unless the user asks.
Ownership
Preserve resources and state owned outside the current azd project.
Project defaults
Concern
Preferred default
Project manifest
One azure.yaml at the repository root.
Application code
src/<service-name> per independently deployable service.
Infrastructure
infra with a thin entry point and reusable modules.
IaC provider
Bicep unless the repository or user chooses Terraform.
Deployment environments
Separate named environments for dev, test, staging, and production.
Local AZD state
.azure/<environment-name> excluded from source control.
Shared environment state
AZD remote environments backed by Azure Blob Storage.
Secrets
Managed identity/RBAC first, then Key Vault references.
Automation scripts
Short, idempotent scripts under scripts/azd.
CI authentication
Workload identity federation/OIDC where supported.
Routine development
azd up for simple workflows; separate phases for controlled workflows.
Modeling rules
Area
Required practice
Services
Define one services entry for each independently deployable component; keep service keys stable; map each service to actual project, language, and host.
Shared infrastructure
Keep shared infrastructure in IaC rather than inventing a fake deployable service.
Dependencies
Declare dependencies with supported azure.yaml fields instead of relying on file order.
Bicep/Terraform entry
Keep main.bicep or main.tf as the orchestration entry point.
Modules
Split reusable or independently understandable infrastructure into modules.
Parameters
Parameterize environment-specific values; do not fork the IaC tree per environment.
Outputs
Output only stable, nonsecret values needed by deployment or application configuration.
Naming and tags
Use deterministic naming and tags that include project and environment.
Permissions
Add role assignments to identities rather than distributing service keys.
Layers
Use infrastructure layers only for separate scopes or lifecycle dependencies.
For environments, use predictable names such as <project>-dev for shared environments and <alias>-dev for personal environments. Use azd env set, azd env unset, azd env set-secret, azd env refresh, -e, and --environment rather than hand-editing .env files or relying on implicit context.
Hooks and CI/CD
Prefer declarative IaC and native service configuration over hooks. Use root hooks for project-wide behavior, service hooks for service-specific behavior, and versioned scripts under scripts/azd for nontrivial logic. Set shell explicitly, provide windows and posix variants when necessary, keep hooks idempotent and noninteractive in CI, fail on errors unless intentionally nonblocking, and test with azd hooks run <hook-name>.
For CI/CD, keep the pipeline definition with the template, review generated changes from azd pipeline config, use short-lived federated credentials, run tests and IaC validation before provisioning, use explicit environments and --no-prompt, add production approval gates, and configure protected remote state before Terraform pipeline setup.
For a Bicep what-if or Terraform plan, choose the correct deployment scope and environment because the command can authenticate to Azure or read remote state.
Progressive disclosure and bundled resources
references/project-structure.md: repository layout and azure.yaml guidance.
references/iac-and-environments.md: Bicep, Terraform, parameters, outputs, layers, and environments.
references/security-cicd-operations.md: secrets, hooks, CI/CD, deployment, and troubleshooting.
references/official-docs.md: current Microsoft product documentation links.
examples/azure.yaml: example manifest shape.
Output template
## Azure Developer CLI result — <project or task>
**Status:** changed | reviewed | blocked
**IaC provider:** Bicep | Terraform | unknown
**Environment assumptions:** <environment, subscription, tenant, region, or none>
| Area | Finding or change | Evidence | Follow-up |
| --- | --- | --- | --- |
| azure.yaml | <service/path/provider result> | `<file/path>` | <next action> |
| infra | <Bicep/Terraform result> | `<file/path>` | <next action> |
| security | <secret/state/identity result> | `<evidence>` | <next action> |
| validation | <command> | pass | fail | not run | <why> |
**Cloud-changing commands not run:** <azd up/provision/deploy/down/pipeline config or none>
**Preview or beta features:** <feature or none>
Quality gate
azure.yaml was read before service, provider, or path conclusions were made.
azure.yaml paths exist and service settings match source projects.
The IaC entry point and provider agree with azure.yaml.
Required deployment outputs match variables consumed by services, hooks, and pipelines.
.gitignore excludes .azure, secrets, local state, and generated artifacts.
No secret appears in tracked content or command output.
Applicable Bicep, Terraform, hook, package, application, or pipeline checks were run or explicitly deferred.
Documentation explains prerequisites, environment creation, deployment, verification, and cleanup when this skill changes template behavior.
1---2name: azure-developer-cli-23description: Design, create, review, migrate, or troubleshoot Azure Developer CLI azd projects using azure.yaml, infra Bicep or Terraform, environments, secrets, hooks, deployment workflows, and azd-managed CI/CD. Use this skill when the user asks for azd project structure, Azure Developer CLI best practices, azd templates, or azure.yaml guidance.4license: MIT5---67# Azure Developer CLI best practices89Produce maintainable, secure, environment-aware `azd` projects by reading the repository manifest first, preserving the chosen IaC provider, and validating only the checks that apply.1011## When to invoke1213- "Review this azd project."14- "Create or fix azure.yaml for this app."15- "How should this Azure Developer CLI template be structured?"16- "Troubleshoot azd provision, deploy, or pipeline config."17- "Migrate this app to an azd template with Bicep or Terraform."1819## Prerequisites and context2021- Read `azure.yaml` before inferring services, paths, IaC provider, or deployment behavior.22- Find the configured `infra.path`, source projects, deployment scripts, `.gitignore`, and pipeline definitions before editing.23- Identify whether the task is create, migrate, review, deploy, or troubleshoot.24- Identify the active environment only when an environment-specific operation is required.25- Read bundled references on demand: `references/project-structure.md`, `references/iac-and-environments.md`, `references/security-cicd-operations.md`, and `references/official-docs.md`.2627## Safety guardrails2829| Guardrail | Rule |30| --- | --- |31| Local state | Never commit `.azure`, environment `.env` files, local Terraform state, generated deployment artifacts, or deployment outputs containing secrets. |32| Secrets | Never put literal secrets in `azure.yaml`, IaC parameter files, hooks, source control, logged command arguments, or IaC outputs. |33| Identity | Prefer managed identities, RBAC, Key Vault references, and `azd env set-secret`. |34| Cloud changes | Before resource-changing or cloud-changing commands, confirm environment, subscription, tenant, region, and expected scope. |35| User approval | Treat explicit deploy, provision, destroy, or pipeline requests as approval for that named action; otherwise ask before `azd up`, `azd provision`, `azd deploy`, `azd down`, or `azd pipeline config`. |36| Architecture | Do not replace Bicep with Terraform, Terraform with Bicep, or a hosting service unless the user asks. |37| Ownership | Preserve resources and state owned outside the current `azd` project. |3839## Project defaults4041| Concern | Preferred default |42| --- | --- |43| Project manifest | One `azure.yaml` at the repository root. |44| Application code | `src/<service-name>` per independently deployable service. |45| Infrastructure | `infra` with a thin entry point and reusable modules. |46| IaC provider | Bicep unless the repository or user chooses Terraform. |47| Deployment environments | Separate named environments for dev, test, staging, and production. |48| Local AZD state | `.azure/<environment-name>` excluded from source control. |49| Shared environment state | AZD remote environments backed by Azure Blob Storage. |50| Secrets | Managed identity/RBAC first, then Key Vault references. |51| Automation scripts | Short, idempotent scripts under `scripts/azd`. |52| CI authentication | Workload identity federation/OIDC where supported. |53| Routine development | `azd up` for simple workflows; separate phases for controlled workflows. |5455## Modeling rules5657| Area | Required practice |58| --- | --- |59| Services | Define one `services` entry for each independently deployable component; keep service keys stable; map each service to actual `project`, `language`, and `host`. |60| Shared infrastructure | Keep shared infrastructure in IaC rather than inventing a fake deployable service. |61| Dependencies | Declare dependencies with supported `azure.yaml` fields instead of relying on file order. |62| Bicep/Terraform entry | Keep `main.bicep` or `main.tf` as the orchestration entry point. |63| Modules | Split reusable or independently understandable infrastructure into modules. |64| Parameters | Parameterize environment-specific values; do not fork the IaC tree per environment. |65| Outputs | Output only stable, nonsecret values needed by deployment or application configuration. |66| Naming and tags | Use deterministic naming and tags that include project and environment. |67| Permissions | Add role assignments to identities rather than distributing service keys. |68| Layers | Use infrastructure layers only for separate scopes or lifecycle dependencies. |6970For environments, use predictable names such as `<project>-dev` for shared environments and `<alias>-dev` for personal environments. Use `azd env set`, `azd env unset`, `azd env set-secret`, `azd env refresh`, `-e`, and `--environment` rather than hand-editing `.env` files or relying on implicit context.7172## Hooks and CI/CD7374Prefer declarative IaC and native service configuration over hooks. Use root hooks for project-wide behavior, service hooks for service-specific behavior, and versioned scripts under `scripts/azd` for nontrivial logic. Set `shell` explicitly, provide `windows` and `posix` variants when necessary, keep hooks idempotent and noninteractive in CI, fail on errors unless intentionally nonblocking, and test with `azd hooks run <hook-name>`.7576For CI/CD, keep the pipeline definition with the template, review generated changes from `azd pipeline config`, use short-lived federated credentials, run tests and IaC validation before provisioning, use explicit environments and `--no-prompt`, add production approval gates, and configure protected remote state before Terraform pipeline setup.7778## Validation commands7980Run only checks applicable to the repository:8182```text83Application: existing formatter, linter, type-check, build, and tests84Bicep: az bicep build --file infra/main.bicep85Terraform: terraform fmt -check -recursive86 terraform init -backend=false87 terraform validate88AZD hooks: azd hooks run <hook-name>89Packaging: azd package90```9192For a Bicep what-if or Terraform plan, choose the correct deployment scope and environment because the command can authenticate to Azure or read remote state.9394## Progressive disclosure and bundled resources9596- `references/project-structure.md`: repository layout and `azure.yaml` guidance.97- `references/iac-and-environments.md`: Bicep, Terraform, parameters, outputs, layers, and environments.98- `references/security-cicd-operations.md`: secrets, hooks, CI/CD, deployment, and troubleshooting.99- `references/official-docs.md`: current Microsoft product documentation links.100- `examples/azure.yaml`: example manifest shape.101102## Output template103104```markdown105## Azure Developer CLI result — <project or task>106107**Status:** changed | reviewed | blocked108**IaC provider:** Bicep | Terraform | unknown109**Environment assumptions:** <environment, subscription, tenant, region, or none>110111| Area | Finding or change | Evidence | Follow-up |112| --- | --- | --- | --- |113| azure.yaml | <service/path/provider result> | `<file/path>` | <next action> |114| infra | <Bicep/Terraform result> | `<file/path>` | <next action> |115| security | <secret/state/identity result> | `<evidence>` | <next action> |116| validation | <command> | pass | fail | not run | <why> |117118**Cloud-changing commands not run:** <azd up/provision/deploy/down/pipeline config or none>119**Preview or beta features:** <feature or none>120```121122## Quality gate123124- [ ] `azure.yaml` was read before service, provider, or path conclusions were made.125- [ ] `azure.yaml` paths exist and service settings match source projects.126- [ ] The IaC entry point and provider agree with `azure.yaml`.127- [ ] Required deployment outputs match variables consumed by services, hooks, and pipelines.128- [ ] `.gitignore` excludes `.azure`, secrets, local state, and generated artifacts.129- [ ] No secret appears in tracked content or command output.130- [ ] Applicable Bicep, Terraform, hook, package, application, or pipeline checks were run or explicitly deferred.131- [ ] Documentation explains prerequisites, environment creation, deployment, verification, and cleanup when this skill changes template behavior.
Run npx skillmds@latest add paulasilvatech/azure-developer-cli-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Design, create, review, migrate, or troubleshoot Azure Developer CLI azd projects using azure.yaml, infra Bicep or Terraform, environments, secrets, hooks, deployment workflows, and azd-managed CI/CD. Use this skill when the user asks for azd project structure, Azure Developer CLI best practices, azd templates, or azure.yaml guidance. It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
paulasilvatech (@paulasilvatech) published this skill. Their other Agent Skills are listed on their SkillMD profile.