trainer-demo-deploy: Command for Claude Code

.github/prompts/generate-bicep.prompt.md

generate-bicep is a command for Claude Code, GitHub Copilot from MicrosoftLearning/trainer-demo-deploy. It costs 38 tokens per session (661 once invoked), scanned A, original, MIT.

A command that discovers Azure governance rules and generates Bicep infrastructure templates. Bicep is a language for declaring Azure resources, while Azure Verified Modules are reusable, reviewed infrastructure components.

In plain words
What is it for?
Use it to plan and generate Azure infrastructure for a project, apply security and policy requirements, and save templates that Azure Developer CLI can provision.
Why use it?
It helps prevent deployments that violate effective Azure policies and avoids manually assembling infrastructure definitions. It also records governance constraints and checks whether suitable reusable modules are available.

Command for Claude CodeGitHub Copilot

Written for Claude Code and GitHub Copilot: argument-hint in frontmatter, but also a Copilot chat mode or prompt. Also seen: model in frontmatter; mentions Codex.

This is MicrosoftLearning/trainer-demo-deploy's own configuration. It tells Claude Code and GitHub Copilot how to work on trainer-demo-deploy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything trainer-demo-deploy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MicrosoftLearning/trainer-demo-deploy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MicrosoftLearning/trainer-demo-deploy/main/.github/prompts/generate-bicep.prompt.md
Clone the repo
git clone --depth 1 https://github.com/MicrosoftLearning/trainer-demo-deploy

Made for: Claude Code, GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-bicep

README.md
[![agentmods](https://agentmods.dev/badge/commands/microsoftlearning/trainer-demo-deploy/generate-bicep/github.svg)](https://agentmods.dev/commands/microsoftlearning/trainer-demo-deploy/generate-bicep)
Your own site
<a href="https://agentmods.dev/commands/microsoftlearning/trainer-demo-deploy/generate-bicep"><img src="https://agentmods.dev/badge/commands/microsoftlearning/trainer-demo-deploy/generate-bicep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-bicep

Your own site · 80×15
<a href="https://agentmods.dev/commands/microsoftlearning/trainer-demo-deploy/generate-bicep"><img src="https://agentmods.dev/badge/commands/microsoftlearning/trainer-demo-deploy/generate-bicep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 661 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00661
Opus 5.5 $0.00015 $0.00264
Sonnet 5.5 $0.00008 $0.00132
Haiku 4.5 $0.00004 $0.00066

Measured today against content hash c4364265e97b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-bicep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/prompts/generate-bicep.prompt.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Bicep Templates

Discover governance constraints, plan the implementation, generate production-ready Bicep templates with AVM modules, and validate.

Mission

Run governance discovery, verify AVM availability, auto-select deployment strategy, generate the implementation plan, then progressively build Bicep modules with security baselines and automated validation.

Scope & Preconditions

  • generated-scenarios/${input:projectName}/02-architecture-assessment.md must exist
  • Read .github/skills/az-consolidated/SKILL.md for naming, tags, AVM, security, templates, and Bicep patterns
  • Templates saved to generated-scenarios/${input:projectName}/infra/ and compatible with azd provision

Inputs

Variable Description Default
${input:projectName} Project name matching the generated-scenarios/ folder Required

Workflow

Step 1: Governance Discovery

  1. Verify Azure connectivity (az account show)
  2. Query ALL effective policy assignments via REST API
  3. Classify policy effects — Deny policies are hard blockers
  4. Save to generated-scenarios/{projectName}/04-governance-constraints.md and .json

Step 2: AVM Verification & Deployment Strategy

  1. Query AVM metadata for each resource in the architecture
  2. Auto-select deployment strategy (phased for >5 resources, single otherwise)
  3. Document module paths and versions

Step 3: Progressive Implementation

Generate templates following dependency order:

  1. main.bicep — orchestrator with uniqueSuffix, conditional phases
  2. main.bicepparam — parameter file for default environment
  3. modules/ — one module per resource, AVM-first
  4. Apply: baseline tags, security baseline, CAF naming, governance compliance

Step 4: Validation

  1. Run bicep build main.bicep — fix any errors
  2. Run bicep lint main.bicep — fix any warnings
  3. Save generated-scenarios/{projectName}/05-implementation-reference.md

Read the full file on GitHub · 81 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 81 lines · 38 tokens per session scan A c4364265e97b

Subscribe to this mod's changes

generate-bicep is a command published in the GitHub repository MicrosoftLearning/trainer-demo-deploy (31 stars, last pushed 11d ago), licensed MIT. It adds 38 tokens to every session and 661 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-07.

Related

generate-bicep compared with commands from other repositories

generate-bicep next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generate-bicepMicrosoftLearning/trainer-demo-deployCommand3111d agoMITA38Claude Code, GitHub Copilot
cost-optimizewshobson/agentsCommand42k2d agoMITA26Claude Code
deploybutterbase-ai/butterbase-skillsCommand5357d agoMITA20Claude Code
envvercel/vercel-pluginCommand328yesterdaynoneA35Claude Code
firebase-publishPierry/harness-kitCommand41mo agoMITA20Claude Code
scanprajapatimehul/claude-aws-cost-saverCommand244mo agoMITA6Claude Code
migrationdatabayt/hogwartsCommand184d agononeA4Claude Code