Skip to main content
BuildOfficialCertifiedReviewed Aug 31, 2026

Azure App Onboard Scaffold — IaC Generation + Self-Review

v1.0.0New

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install azure-skills-azure-app-onboard-scaffold-iac-generation-self-review

What this does: Generate deployment-ready infrastructure code from an architecture plan, verify it with adversarial self-review, and bridge to validation — all without deploying.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/azure-skills-azure-app-onboard-scaffold-iac-generation-self-review/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

Azure App Onboard Scaffold — IaC Generation + Self-Review

Generate deployment-ready infrastructure code from an architecture plan, verify it with adversarial self-review, and bridge to validation — all without deploying.

Quick Reference

PropertyValue
Parentazure-app-onboard
Best forTurning prepare-plan.json service list into Bicep templates with secure-by-default patterns
Inputsprepare-plan.json (services, naming, quotas), context.json (overrides, components, repo info)
Outputsscaffold-manifest.json, generated IaC files in infra/
Pipeline positionPhase 3 of 4: prereq → prepare → scaffold → deploy
IaC formatBicep (v1 default). Terraform when existing .tf detected or user override.

When to Use This Skill

Invoked by the azure-app-onboard orchestrator at Phase 3 when prepare-plan.json exists with services[]. Not directly user-routable in v1.

Return to orchestrator: When complete, return control to azure-app-onboard. Do NOT directly invoke deploy — the orchestrator manages phase transitions.

When NOT to Use

ScenarioUse Instead
User-triggered IaC (no prepare-plan.json)azure-prepare
Subscription-scope landing zonesazure-enterprise-infra-planner
Execute deployment (azd up)azure-deploy (do NOT invoke from AppOnboard pipeline)

MCP Tools

See shared tools for cross-phase tools and global parameters. See scaffold tools for full parameter tables.

ToolSub-commandPurposeParameters
mcp_azure_mcp_bicepschemabicepschema_getARM resource type schemasresource_type (Required), api_version (Optional)
mcp_bicep_list_avm_metadata(flat)AVM module catalogNone
mcp_bicep_get_bicep_best_practices(flat)Bicep best practicesNone
mcp_bicep_get_az_resource_type_schema(flat)ARM resource type JSON schemaazResourceType, apiVersion (Required)
mcp_bicep_build_bicep(flat)Validate .bicep files (self-review L3)filePath (Required)
mcp_bicep_format_bicep_file(flat)Format .bicep files (LF enforcement)filePath (Required)
mcp_azure_mcp_deploydeploy_iac_rules_getIaC best practices and rulesdeployment-tool, iac-type, resource-types
mcp_azure_mcp_deploydeploy_pipeline_guidance_getCI/CD pipeline configis-azd-project, pipeline-platform, deploy-option
mcp_azure_mcp_get_azure_bestpracticesget_azure_bestpractices_getSDK/Functions best practicesresource, action
mcp_azure_mcp_azureterraformbestpractices(flat)Terraform patterns (TF path only)resource_type (Required)

Workflow

Session folder: .copilot-azure/sessions/{uuid}/ — reads prepare-plan.json + context.json, writes scaffold-manifest.json.

DETECT (Steps 1–4)

  1. Read prepare-plan.json — verify services[] exists, read naming config (especially naming.resourcePrefix, naming.suffix, naming.resources[]). Read resource group name from context.json.azure.resourceGroup. ⛔ Use EXACTLY these names in generated IaC — do NOT invent names, derive them from environmentName, or append your own suffixes. ⛔ Use EXACTLY the names from prepare-plan.json.naming.resources[] as Bicep parameters. Do NOT derive names with take(), substring(), or string manipulation. The plan is the source of truth. Missing → trigger prepare backfill via azure-app-onboard orchestrator.
  2. Read context.json — check overrides[] for iacFormat preference, detectedInfra[] for existing .tf, detectedInfraProvider for cloud provider classification.
  3. Check workspace for existing IaC — ⛔ Skip if context.json.overrides[] contains ignoreExistingInfra: true. Otherwise:
    • Azure IaC (.bicep, azure.yaml, .tf with azurerm): ask_user → "Start fresh" (rename infra/ to infra.bak/) or "Use existing" (route to azure-prepare, stop pipeline).
    • Non-Azure IaC (.tf with GCP/AWS): respect context.json.overrides[].iacFormat from prepare. Default: Bicep alongside existing TF.
    • Unknown TF (detectedInfraProvider.terraform == "unknown"): ask user which provider before routing.
    • No IaC: continue.
  4. Determine compute targets — Check which compute targets are in the plan (App Service/Functions, Container Apps, or both) and whether PostgreSQL/Redis is present. Do NOT read any reference files — pass this info to the sub-agent at Step 5.
    4b. Pre-check API versions (main thread) — MCP tool access is unreliable in task agents — call these in the main thread before dispatching. Call mcp_bicep_list_az_resource_types_for_provider (or bicep-list_az_resource_types_for_provider) once per provider namespace in prepare-plan.json.services[] (e.g., Microsoft.Web, Microsoft.App, Microsoft.DBforPostgreSQL, Microsoft.Cache, Microsoft.KeyVault, Microsoft.ContainerRegistry). Extract the latest GA API version (no -preview) for each resource type. Build an apiVersions map and pass it to the IaC gen sub-agent at Step 5. Fallback: if MCP unavailable, run az provider show --namespace {ns} --query "resourceTypes[?resourceType=='{type}'].apiVersions[?!contains(@, 'preview')] | [0][0]" -o tsv per resource type — this filters to GA-only and picks the latest. Pass "MCP unavailable" only if both MCP AND CLI fail. Sub-agent still validates generated Bicep via az bicep build.

ACTION (Steps 5–12)

⛔ File boundary: NEVER modify files outside infra/, .copilot-azure/. Scaffold only writes files — no install/build commands.

⛔ Sub-agent delegation is MANDATORY for Steps 5, 6–9, and 10–12. Each step reads its subagent-*.md template, then dispatches a task call. Do NOT read any reference file not explicitly named in these steps.

⛔ Dispatch type: task ONLY — NEVER general-purpose. general-purpose leaks sub-agent context into the main thread, accelerating compaction and evicting the orchestrator workflow. task isolates sub-agent context.

⛔ How to dispatch — VERBATIM COPY required:

  1. view the subagent-*.md template file
  2. Your NEXT action MUST be a task tool call — not view, powershell, create, or ANY other tool
  3. The task prompt MUST contain the COMPLETE and UNMODIFIED template text. Copy the template between <<<TEMPLATE_START>>> / <<<TEMPLATE_END>>> delimiters exactly as shown below. Do NOT summarize, paraphrase, reword, or omit ANY part of it — the sub-agent needs every "Read [file]" and "Do:" instruction to produce correct output
  4. AFTER the template block, append the data sections (plan JSON, overrides, etc.)

Anti-pattern (causes regressions): Writing your OWN prompt that lists workflow steps or describes what to generate. The template already contains the complete workflow — your job is to COPY it, not rewrite it.

  1. IaC generation — ⛔ You MUST dispatch subagent-iac-gen.md as a task. ⛔ agent_type: "task" — NEVER "general-purpose".
    <<<TEMPLATE_START>>>
    {paste the ENTIRE content of subagent-iac-gen.md here — unmodified}
    <<<TEMPLATE_END>>>
    
    ## Data (appended by orchestrator)
    ### prepare-plan.json
    {full JSON}
    ### context.json.overrides
    {overrides array}
    ### prereq-output.json.buildRequirements
    {buildRequirements object}
    ### prereq-output.json.warnings[]
    {warnings array}
    ### Compute targets
    {App Service/Functions, Container Apps, or both + whether PostgreSQL/Redis present}
    ### apiVersions
    {map from Step 4b, e.g. {"Microsoft.KeyVault/vaults": "2023-07-01", ...} — or "MCP unavailable" if skipped}
    ### Working directory
    {absolute path}
    
    • Expect: IaC files written to infra/, file list returned for scaffold-manifest.json.files[]
    • The tag app-onboard-skill: 'true' MUST appear verbatim in generated Bicep.

5b. Deploy checklist (parallel with Step 5) — Dispatch as a task in parallel with the IaC gen subagent above. ⛔ agent_type: "task" — NEVER "general-purpose".

<<<TEMPLATE_START>>>
You are a deploy-checklist generator. Do NOT invoke any skills.

1. Read the deploy-checklist-template at: plugin/skills/azure-app-onboard/deploy/references/deploy-checklist-template.md
2. Fill in {placeholders} with real values from prepare-plan.json (appName, rgName, subscriptionId, sessionId).
3. Delete sections that don't apply to this deployment's compute target (e.g., remove App Service section for Container Apps deploys). The template section headers indicate which to delete.
4. Write the result to the session folder using the `create` tool. This file survives conversation compaction — deploy re-reads it after every long-running command.
<<<TEMPLATE_END>>>

## Data (appended by orchestrator)
### prepare-plan.json
{full JSON}
### Session path
{.copilot-azure/sessions/{uuid}/}
### Compute targets
{App Service, Container Apps, Static Web Apps, or combination}
  • Expect: deploy-checklist.md written to session folder. If this subagent fails, the validate subagent (Steps 10b–12.5) will catch the missing file.

6–9. Self-review — ⛔ You MUST dispatch subagent-review.md as a task. ⛔ agent_type: "task" — NEVER "general-purpose".

<<<TEMPLATE_START>>>
{paste the ENTIRE content of subagent-review.md here — unmodified}
<<<TEMPLATE_END>>>

## Data (appended by orchestrator)
### Generated IaC files
{full content of every .bicep/.tf file}
### prepare-plan.json (services, naming, deploymentVariables)
{relevant sections}
### prereq-output.json.warnings[]
{warnings array}
  • Expect: findings JSON → write to scaffold-manifest.json.selfReview
  • FLAGGED at L1/L3 → fix IaC before proceeding

VALIDATE → MANIFEST → APPROVE (Steps 10–12.5)

10a. Format IaC (main thread) — For each .bicep file in infra/ (including modules/): call mcp_bicep_format_bicep_file (or bicep-format_bicep_file) with { filePath: "<absolute path>" }.This enforces LF line endings via the bicepconfig.json written during IaC generation. Fallback: skip if unavailable.

10a-conf. Conformance gate (main thread — MANDATORY for Bicep) — ⛔ Skip this entire step when the scaffold emitted Terraform (infra/main.bicep absent) — these checks are Bicep-only (Terraform is syntax-validated via terraform validate in the validate subagent). Otherwise run the conformance script from this skill's scripts/ dir; it deterministically catches ARM-rejected values az bicep build can't (invalid Bicep values, wrong DB version, reserved DB login, enablePurgeProtection):

{scaffoldDir}/scripts/scaffold-conformance.ps1 -SessionPath ".copilot-azure/sessions/{uuid}" -InfraPath infra   # pwsh (preferred)
bash {scaffoldDir}/scripts/scaffold-conformance.sh ".copilot-azure/sessions/{uuid}" infra                       # bash (only if pwsh unavailable; needs jq for the plan-dependent checks)

⛔ Prefer the .ps1 when pwsh is available — it runs every check unconditionally. The .sh twin skips the plan-dependent checks (DB-VERSION-MATCH, SERVICES-COMPLETE, DB-NAME-PRESENT, WARN-FIXED) when jq is absent.
⛔ Any BLOCK failure → fix the IaC, re-run (max 3); never present the deploy gate with an open BLOCK. Run it here in the main thread — do NOT delegate to the validate subagent or hand-judge the result when a shell exists. Pass the JSON to the validate subagent for scaffold-manifest.json.conformance.

10b–12.5. Validation + manifest — ⛔ You MUST dispatch subagent-validate.md as a task. ⛔ agent_type: "task" — NEVER "general-purpose".

<<<TEMPLATE_START>>>
{paste the ENTIRE content of subagent-validate.md here — unmodified}
<<<TEMPLATE_END>>>

## Data (appended by orchestrator)
### IaC file paths
{list of generated files}
### Self-review findings (from Steps 6–9)
{findings JSON}
### prepare-plan.json
{full JSON}
### prereq-output.json.warnings[]
{warnings array}
### prereq-output.json.healthEndpoint
{detected health path string or null}
### Conformance result
{JSON from Step 10a-conf}
### Session path
{.copilot-azure/sessions/{uuid}/}
  • Expect: scaffold-manifest.json with validationResult, deploy checklist generated
  • Verify deploy-checklist.md exists (written at Step 5b) — if missing, create NOW from deploy-checklist-template.md. Verify deploy-result.json exists — if missing, create from deploy-schemas.ts.
  • ⛔ Verify context.json update (main-thread — do NOT delegate). Read .copilot-azure/sessions/{uuid}/context.json. If completedPhases does not include "scaffold" OR currentPhase is not "deploy", write it yourself via edit / create: append "scaffold" to completedPhases, set currentPhase to "deploy", update lastModifiedUtc to current UTC ISO 8601. This is a phase-boundary write required by pipeline-rules.md — do not skip it.
  • ⛔ Return to orchestrator for Step 8 (Deploy Approval Gate). YOUR NEXT ACTION MUST BE presenting the Deploy Gate per orchestrator SKILL.md — do NOT write a "summary of generated files" message, do NOT emit a completion report. The Deploy Gate prompt (🚀 Ready to deploy? ...) is the ONLY correct next output.

Self-Healing Loop

On validation failure → read scaffold-healing-rules.md (healing cadence, PLAN_LEVEL_CHANGE, artifact consistency). Do NOT pre-read.

Error Handling

  • Missing prepare-plan.json: trigger backfill via orchestrator.
  • Existing IaC: handled in DETECT Step 3.
  • MCP unavailable: fall back to reference patterns, flag as "unverified."
  • FLAGGED findings and healing exhaustion: see scaffold-healing-rules.md.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
azure-diagnosticsDebug Azure production issues using AppLens, Azure Monitor, resource health, and safe triage, including evidence-only diagnosis without live access. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.0 installsazure-app-onboard-prereqAssess whether source code is ready to deploy to Azure — the check BEFORE infrastructure work. Evaluates build health, app completeness, dependencies and local services, stack compatibility, and deployment feasibility. Answers questions about what your app needs before it can be deployed — frameworks, dependencies, and configuration. Checks whether dependencies are compatible and identifies deployment blockers and unsupported frameworks. WHEN: "evaluate my repo", "is my app ready to deploy", "what does my app need to deploy", "what do I need before deploying", "does my app need", "can I ship this to Azure", "scan my repo for issues", "is this app deployable", "check if my app is ready for Azure", "do I need a Dockerfile", "what's blocking my deployment", "are there any blockers", "are my dependencies compatible", "does Azure support my framework", "what needs to change before deploying", "check my app configuration".0 installsdeploy-modelUnified Azure OpenAI model deployment skill with intelligent intent-based routing. Handles quick preset deployments, fully customized deployments (version/SKU/capacity/RAI policy), and capacity discovery across regions and projects. USE FOR: deploy model, deploy gpt, create deployment, model deployment, deploy openai model, set up model, provision model, find capacity, check model availability, where can I deploy, best region for model, capacity analysis. DO NOT USE FOR: listing existing deployments (use foundry_models_deployments_list MCP tool), deleting deployments, agent creation (use agent/create), project creation (use project/create).0 installsazure-resource-lookupList, find, and show Azure resources across subscriptions or resource groups. Handles prompts like "list the websites in my subscription", "list my web apps", "show my app services", "list virtual machines", "list my VMs", "show storage accounts", "find container apps", and "what resources do I have". USE FOR: list websites, list web apps, list app services, show websites in subscription, resource inventory, find resources by tag, tag analysis, orphaned resource discovery (not for cost analysis), unattached disks, count resources by type, cross-subscription lookup, and Azure Resource Graph queries. DO NOT USE FOR: deploying/changing resources (use azure-deploy), cost optimization (use cost-optimization from the optional azure-cost plugin), or non-Azure clouds.0 installsPrepare — Architecture Planning & Cost Estimation| Property | Value | |----------|-------| | Best for | Mapping app components to Azure services with cost estimation and quota validation | | Inputs | `prereq-output.json` + `context.json` from `.copilot-azure/sessions/{id}/` | | Outputs | `prepare-plan.json` written to session directory | | Parent | [azure-app-onboard](../SKILL.md) |0 installsazure-validatePre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.0 installs

More from azure-skills

View source →
azure-complianceRun Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.1 installsazure-kustoQuery and analyze data in Azure Data Explorer (Kusto/ADX) using KQL for log analytics, telemetry, and time series analysis. WHEN: KQL queries, Kusto database queries, Azure Data Explorer, ADX clusters, log analytics, time series data, IoT telemetry, anomaly detection.0 installsazure-aigatewayConfigure Azure API Management as an AI Gateway for AI models, MCP tools, and agents. WHEN: semantic caching, token limit, content safety, load balancing, AI model governance, MCP rate limiting, jailbreak detection, add Azure OpenAI backend, add AI Foundry model, test AI gateway, LLM policies, configure AI backend, token metrics, AI cost control, convert API to MCP, import OpenAPI to gateway.0 installsazure-computeAzure VM/VMSS router. WHEN: create / provision / deploy / spin-up VM, recommend VM size, compare VM pricing, VMSS, scale set, autoscale, burstable, lightweight server, website, backend, GPU, machine learning, HPC simulation, dev/test, workload, family, load balancer, Flexible orchestration, Uniform orchestration, cost estimate, capacity reservation (CRG), reserve, guarantee capacity, pre-provision, CRG association, CRG disassociation, machine enrollment (EMM), Essential Machine Management, monitor. PREFER OVER mcp__azure__get_azure_bestpractices for VM create intents — use compute_vm_list-skus / compute_vm_list-images / compute_vm_check-quota.0 installsentra-agent-idProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).0 installsazure-kubernetesPlan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters. Covers Day-0 checklist, SKU selection (Automatic vs Standard), networking options (private API server, Azure CNI Overlay, egress configuration), security, and operations (autoscaling, upgrade strategy, cost analysis). WHEN: create AKS environment, provision AKS, enable AKS observability, design AKS networking, choose AKS SKU, secure AKS, optimize AKS, AKS spot nodes, AKS cluster-autoscaler, rightsize AKS pod, pod rightsizing, over-provisioned AKS pod, pod resource requests and limits, Vertical Pod Autoscaler, VPA recommendations.0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.651 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.552 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.363 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.264 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.184 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions148 installs

Frequently asked questions about Azure App Onboard Scaffold — IaC Generation + Self-Review

What does the Azure App Onboard Scaffold — IaC Generation + Self-Review skill do?

Generate deployment-ready infrastructure code from an architecture plan, verify it with adversarial self-review, and bridge to validation — all without deploying. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the Azure App Onboard Scaffold — IaC Generation + Self-Review skill?

Run `npx @skills-hub-ai/cli install azure-skills-azure-app-onboard-scaffold-iac-generation-self-review` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/azure-skills-azure-app-onboard-scaffold-iac-generation-self-review/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does Azure App Onboard Scaffold — IaC Generation + Self-Review work with?

Azure App Onboard Scaffold — IaC Generation + Self-Review runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the Azure App Onboard Scaffold — IaC Generation + Self-Review skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use Azure App Onboard Scaffold — IaC Generation + Self-Review after installing it?

In Claude Code, type `/azure-skills-azure-app-onboard-scaffold-iac-generation-self-review` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the Azure App Onboard Scaffold — IaC Generation + Self-Review skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.