Skill Instructions
Goal
Generate a new, human-maintainable set of .bicep files plus a .bicepparam file that deploys Azure infrastructure based on user requirements.
Guiding Principles
- •Optimize for maintainability and clarity: split into sensible modules, use descriptive names, and factor repeated patterns.
- •Prefer templates that look like they were written by a human, not auto-generated code.
- •Always start with example infrastructure and planning before generating resource configurations.
Required Tools / Commands
Strongly prefer the following tools/commands as part of the workflow, instead of finding other tools or CLI commands to call:
- •
generate_infrastructure_planMCP tool: gather comprehensive requirements and generate a detailed architecture design. - •
generate_resource_bodyMCP tool: get properly configured resource definitions with security best practices applied. - •
get_bicep_best_practicesMCP tool: learn current best practices before generating templates. - •
get_bicep_file_diagnosticsMCP tool: compile/validate Bicep and address errors/warnings after generating files. - •
what_if_deploymentMCP tool: run a live diff against Azure using a.bicepparamfile.
Workflow
1) Plan the Architecture
- •Gather comprehensive requirements using the
generate_infrastructure_planMCP tool. - •This returns:
- •Overview of the infrastructure design
- •Complete list of required resources with types and API versions
- •Resource relationships and dependencies
- •Security and configuration requirements
- •Explain the proposed architecture to the user before proceeding.
2) Generate Resource Configurations
- •For each resource in the plan, use the
generate_resource_bodyMCP tool to get properly configured resource definitions. - •This returns complete resource body JSON with security best practices applied.
- •Ensure all resources from the plan are accounted for.
3) Create the Bicep Files
- •Generate complete
.bicepand.bicepparamfiles including:- •Parameters with @description annotations for configurable values
- •Variables for computed values
- •Resources converted from JSON to Bicep syntax
- •Proper resource dependencies using Bicep references
- •Outputs for important resource properties (IDs, endpoints, URLs)
- •Comments documenting configuration decisions
- •Use a main entrypoint (for example
main.bicep) and split resources into modules by domain if the infrastructure is complex. - •Declare parameter values in the
.bicepparamfile, rather than using default values in the.bicepfile parameter declarations.
4) Offline validation
- •After generating files, run
get_bicep_file_diagnosticson the.bicepfiles. - •Fix compilation errors immediately.
- •Review warnings and fix anything that could affect correctness, deployment behavior, or maintainability.
5) Live validation
- •Run
what_if_deploymenton the.bicepparamfile. - •Make sure you know which subscriptionId and resourceGroup to use before calling this tool - ask the user for input if you don't have this context.
- •Verify the output matches your expectations.
Acceptance Criteria
- •A coherent set of
.bicepfiles + a.bicepparamfile exists for the requested infrastructure. - •The Bicep compiles cleanly (diagnostics show no errors; warnings are understood/acceptable).
- •All resources from the infrastructure plan are included.
- •Security best practices from the generated resource bodies are applied.