---
name: "azure-bicep-modular-templates"
description: "Author concise, type-safe Azure infrastructure deployments using native Azure Bicep."
metadata:
  author: "Azure"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "write azure bicep template"
  - "deploy bicep with az cli"
  - "compile bicep to arm"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Azure Bicep Modular Infrastructure Templates

Develops Azure infrastructure with Bicep: defining modular .bicep files, parameters and decorators (@secure()), output variables, resource scoping (resourceGroup, subscription), and compiling to ARM templates.

## When to Invoke
Invoke this skill whenever you need to:
- write azure bicep template
- deploy bicep with az cli
- compile bicep to arm

## Execution SOP & Rules
1. Create main.bicep declaring parameters, variables, resources, and modules.
2. Preview deployment changes: az deployment group what-if --resource-group my-rg --template-file main.bicep.
3. Deploy to Azure: az deployment group create --resource-group my-rg --template-file main.bicep.
4. Decompile existing ARM JSON templates into clean Bicep using az bicep decompile.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
