Azure Prepare 技能
支持 Grok Bot
- 安装量
- 78.8万
- GitHub Star
- 1684
- 通过安全扫描
- 2/3
- 发布方
- 官方认证
- 开源协议
- MIT
- 仓库更新
- 2026年11月30日
TL;DR
azure-prepare 是微软面向构建阶段的技能,负责编写部署计划、`azure.yaml`、Bicep/Terraform 与 Dockerfile,让应用就绪以供 `azd` 部署至 Azure。
适合安装
打算使用 `azd` 将新应用或存量应用部署到 Azure,需要经过评审的部署计划与自动化基础设施脚手架的开发者。
可以跳过
非 `azd` 部署、Python App Service 纯代码部署或跨云迁移(相关场景请转向对应专项技能)。
npx skills add https://github.com/microsoft/azure-skills --skill azure-prepare通过 Skillselion MCP 直接试用——无需安装,磁盘零写入。
1. 添加远程连接器:
claude mcp add --transport http skillselion https://mcp.skillselion.com/mcp2. 向你的 Agent 发送指令:
Use Skillselion load_skill to load skill:microsoft/azure-skills#azure-prepare (Azure Prepare) and follow it.通过 Skillselion MCP 直接试用——无需安装,磁盘零写入。
1. 将此 URL 添加为自定义连接器(Claude.ai、ChatGPT 或 Cursor):
https://mcp.skillselion.com/mcp2. 向你的 Agent 发送指令:
Use Skillselion load_skill to load skill:microsoft/azure-skills#azure-prepare (Azure Prepare) and follow it.azure-prepare 核心要点
- 在生成任何代码前先创建 `.azure/deployment-plan.md`
- 自动生成 `azure.yaml`、Bicep 或 Terraform 以及 Dockerfile
- 执行前设有明确的部署计划审批门禁
- 完成后交接给 `azure-validate`,绝不擅自执行部署
azure-prepare 核心数据
| 累计安装量 | 787,524 (78.8万) | skills.sh 注册表 |
|---|---|---|
| GitHub Star | ★ 1684 | GitHub |
| 安全审计 | 通过 2 / 3 项扫描器检测 | skills.sh 审计 |
| 仓库最后更新 | 2026年11月30日 | GitHub |
| 开源协议 | MIT | SKILL.md / GitHub |
| 代码仓库 | microsoft/azure-skills ↗ | |
数据截至 2026年12月1日(Skillselion 目录同步)
- 11 条强制规则
- 2 大阶段:先规划,后执行
- 执行阶段细分为 7 个步骤
azure-prepare 在 Claude Code 中能做什么?
MIT 协议免费技能;实际部署生成的基础设施需付费 Azure 订阅。
- 核心能力
- 云基础设施脚手架 · IaC 代码生成 · Azure 部署筹备 · Dockerfile 生成
- 支持集成
- azure · terraform · docker
- 适用场景
- DevOps 运维 · CI/CD 流水线 · API 开发
- 定价模式
- 免费
Azure Prepare 技能 会输出什么成果?
生成部署计划、基础设施文件、`azure.yaml` 与 Dockerfile,且计划状态更新为 `Ready for Validation`。
- 位于 `.azure/deployment-plan.md` 的部署计划
- 位于 `./infra/` 的基础设施即代码文件
- 供 `azd` 使用的 `azure.yaml` 配置
Deep dive: how does azure-prepare actually work?
azure-prepare is Microsoft's agent skill that turns an application into Azure infrastructure code: it writes a deployment plan, picks a recipe, generates Bicep or Terraform, then hands off without deploying anything. It has 787,524 installs as of December 1, 2026 (Skillselion catalog). The SKILL.md is 12,862 bytes of a 568,768-byte, 166-file bundle.
研读方法提交 968f7bf
We read the file at commit 968f7bf of microsoft/azure-skills on November 14, 2026, and every count below is measured at that commit in the skills/azure-prepare/ tree; the copy under .github/plugins/azure-skills/skills/ is byte-identical, so we count one tree only. When we first wrote this dive, at commit ea76537 on August 20, 2026, we also installed the skill from the registry into an empty directory, and the 164 files that landed were byte-identical to the repository at that commit. We have not re-run the install at 968f7bf, so the install observations below are dated to that first run: one observation on one day, not evidence that the registry never lags.
azure-prepare, step by step
1. The SKILL.md is 2.3% of what you install
And 28 files hang off it directly.
Of 568,768 bytes across 166 files, the SKILL.md accounts for 12,862, so 97.7% of the download is reference material the entry file points at. The bundle is the second-largest of the 28 skills in the azure plugin, behind microsoft-foundry at 231 files and 1,346,428 bytes; the repository's six other plugins add 19 more skill directories, and one of them, foundry-iq, is also larger at 1,276,127 bytes. The third of the file's eleven rules is what makes the shape work:
- Research before generating — Load references and invoke related skills
Source: SKILL.md, "Rules"
Twenty-eight files are linked directly from the SKILL.md, totalling 118,208 bytes. The rest are linked from those, and from the files below those. The entry file is a phase table with a reference column, so what it costs in context is close to fixed no matter how large the tree behind it grows. microsoft-foundry, from the same publisher in the same repository, runs that router shape over twenty-four sub-skills; azure-prepare runs it over reference documents inside one skill.
2. Twelve files load on every full run, whatever you are building
Seven of them before you ever see the plan.
Phase 1 is blocking, and eight of its nine numbered rows name a reference file:
Create
.azure/deployment-plan.mdby completing these steps. Do NOT generate any artifacts until the plan is approved.Source: SKILL.md, "Phase 1: Planning"
Six of those eight are unconditional steps: analyze, requirements, scan, recipe-selection, architecture and plan-template. With the SKILL.md itself, that is seven files and 43,074 bytes, 7.57% of the bundle, opened before the user is shown anything. The other two rows are conditional rather than sequential. Row 0 points at specialized-routing.md and only fires when the prompt matches a dedicated skill, and row 8 points at global-rules.md, which is a standing rule rather than a step; counting both takes Phase 1 to nine files and 49,524 bytes. Row 7 names no reference at all, because what it presents is the plan artifact the previous row wrote.
Between the two phase tables the file puts a hard stop, on its own line and in its own callout:
❌ STOP HERE — Do NOT proceed to Phase 2 until the user approves the plan.
Source: SKILL.md, "Phase 1: Planning"
Phase 2 has seven numbered rows, five of which name a reference file: research, azure-context, generate, security and functional-verification. Those five add 33,012 bytes once the plan is approved, and the last two rows write the plan status and hand off, naming no new reference. So a run that reaches the hand-off without the Step 0 detour (which resumes at Phase 1 step 4 and so skips analyze, requirements and scan) has opened twelve files and 76,086 bytes, 13.4% of the bundle, whatever the application was. Add the two conditional Phase 1 references and the realistic ceiling for the fixed part is 14 files and 82,536 bytes. That band, rather than either the 569 KB install or the 12,862-byte entry file, is the honest context price of loading this skill.
3. Nothing in the bundle is orphaned
All 166 files are reachable from the entry file.
The obvious suspicion about a 166-file bundle is that some of it is dead weight nobody routes to. We built the link graph from every markdown link and inline path in all 166 files, resolved each against the real tree, and walked it from SKILL.md. All 166 files are reachable, with no orphans and no unreferenced bytes. We expected to find dead weight and there is none, which is worth saying plainly.
Reachable is not the same as loaded, though, because the gate is progressive:
For each selected service, load the README.md first, then load specific files as needed:
Source: references/research.md, "Step 1: Load Internal References"
The depth distribution shows how much sits behind that gate: the 28 files linked directly from SKILL.md, then 42 files at two hops, 51 at three, 28 at four, 4 at five and 12 at six. The six-hop files are the App Service recipe sources, reached through research, the App Service README, its template selection file, the recipe index, one recipe README and finally a per-language source note. references/services/ alone is 125 of the 166 files and 366,413 bytes, 64.4% of the bundle, and every byte of it is gated on which Azure services your architecture step picked.
Take the file's own worked example, a web app with an API on Container Apps and Cosmos DB, on the default azd recipe, and count what opens: 127,832 bytes, 22.5% of the bundle, spread over 26 files. The other 140 files, 440,936 bytes, never open on that run. Those 26 are what a single worked run reaches at any depth, a different set from the SKILL.md's 28 direct children. Both are traced through the routing tables, not observed from an agent run.
Some of what is reachable is not instruction at all. Twenty-one files in eval/ directories, 31,952 bytes, are the author's own test reports, linked from the recipe READMEs under an ## Eval heading. They are provenance rather than guidance, and useful for it: the timer recipe's summary records a test date and marks Python verified end to end while the other five languages are only confirmed present in a manifest.
4. The largest sub-tree forbids writing infrastructure code
And fetches templates over the network instead.
references/services/functions/ is 44 files and 127,537 bytes, the biggest service tree in the bundle. Its README opens by taking the obvious job away from the agent:
NEVER synthesize Bicep or Terraform from scratch for Azure Functions.
Source: references/services/functions/README.md, "MANDATORY: Use Composition Algorithm"
The replacement is a composition algorithm that fetches real templates. Where the Azure MCP tools are present it calls functions_template_get. Where they are not, the fallback path is explicit about going to the network:
- FETCH MANIFEST
GET https://cdn.functions.azure.com/public/templates-manifest/manifest.json
If fetch fails → fall back to: https://github.com/Azure/azure-functions-templates/blob/dev/Functions.Templates/Template-Manifest/manifest.json
If both fail → fall back to known-good Azure-Samples/functions-quickstart-* repos by language+resource
Source: references/services/functions/templates/recipes/composition.md, "Fallback Path"
That reframes what those 127,537 bytes are: selection logic, recipe notes and eval records that point at templates living on someone else's server. Behind a proxy that blocks cdn.functions.azure.com and raw.githubusercontent.com, with no Azure MCP server attached, the documented path degrades to a third fallback and then to an error. The author states the reason for the rule plainly in the same callout, that composing tested templates gives you proven IaC patterns, correct RBAC and Flex Consumption defaults, and on Function App infrastructure that is the argument worth making. The cost is a network dependency that the file count hides, on the one path where the bundle looks most self-sufficient.
5. One file is the hard dependency
And two later skills fail without it.
Rule 1 is unusually insistent about a single artifact, and it explains why:
- Plan first — MANDATORY — You MUST physically write an initial
.azure/deployment-plan.mdskeleton in the workspace root directory (not the session-state folder) as your very first action — before any code generation or execution begins. [...] azure-validate and azure-deploy depend on it and will fail without it. [...]Source: SKILL.md, "Rules"
The file returns to this one artifact in the rules, in the plan-first callout, at the head of Phase 1, as Phase 1 step 6, as Phase 2 step 6 and again in the closing hand-off block, and it goes as far as banning .azure/plan.md as an alternative filename. That much repetition is a tell about what breaks in practice: an agent that writes the plan into scratch session state instead of the workspace, and a next skill that then cannot find it.
plan-template.md is 10,304 bytes, the second-largest file in the always-loaded spine, and it carries the checklist that later phases tick off. The plan is the interface between the three skills, so treat it as an artifact you review rather than a status file you skim.
6. The mandated hand-off needs two skills the install does not bring
A one-skill install brings neither azure-validate nor azure-deploy, so the workflow ends at a hand-off to nothing.
azure-prepare will not deploy, by design, and says so:
- Scope: preparation only — This skill generates infrastructure code and configuration files. Deployment execution (
azd up,azd deploy,terraform apply) is handled by the azure-deploy skill, which provides built-in error recovery and deployment verification.Source: SKILL.md, "Rules"
We ran the install command this page generates into an empty directory on August 20, 2026, when the skill was at ea76537. The CLI reported Installed 1 skill and wrote one directory, 164 files, 557,067 bytes; the skill has since grown to 166 files. azure-validate and azure-deploy did not come with it, and neither did azure-quotas, which Phase 2 research tells the agent to invoke for capacity checks. On a default install the workflow terminates at a hand-off to something that is not there.
improve-codebase-architecture has the same shape, with an orchestration step that depends on three siblings you have to install yourself. Here the consequence is larger, because the skill has already written infrastructure code by the time it discovers the next stage is missing.
7. Five sibling skills in the routing table have no directory here
An agent that follows the research patterns literally calls a skill that is not there and improvises the step.
The service-to-reference mapping in research.md pairs each Azure service with the skills to invoke for deeper work, and the worked patterns turn those into numbered steps:
- Invoke:
azure-observability(monitoring setup)Source: references/research.md, "Common Research Patterns"
azure-observability is named five times in research.md. The azure plugin ships 28 skill directories, and no plugin in the repository has one by that name. Nor is azure-nodejs-production, named twice in the same file, or azure-networking, named once against AKS.
A fourth name is easier to hit. Those first three sit in tables and worked patterns that only fire for particular services. azure-provisioning-limit is named three times in references/resources-limits-quotas.md, which azure-context.md sends the agent to at Phase 2 step 2, one hop off the always-loaded spine and independent of which Azure services the architecture step picked.
Check via:
azure__documentationtool or azure-provisioning-limit skillSource: references/resources-limits-quotas.md, "Hard Limits"
The fifth is a different problem and worth separating. research.md pairs Key Vault with azure-keyvault-expiration-audit, and entra-app-registration routes to the same string in its own frontmatter description. No skill directory carries that name, but the content is really there, as a reference file at skills/azure-compliance/references/azure-keyvault-expiration-audit.md. So the guidance exists and the thing named as a skill does not, which is a packaging mismatch rather than a missing document.
Sixteen other skill names that appear anywhere in the azure-prepare tree do resolve to directories in this repository, including python-appservice-deploy and the AWS Lambda migration route, so these are five dangling names and not a fictional ecosystem. A sixth name, cost-estimation, is not dangling either: research.md labels it as coming from the separately installed azure-cost plugin, and that plugin's skill directory sits in this same repository at .github/plugins/azure-cost/skills/cost-estimation/. They may be internal or planned. The azure-skills plugin's CHANGELOG records exactly two retirements, azure-rbac at line 545 and azure-hosted-copilot-sdk at line 589, and none of the five appears in it, so nothing in the file says they were ever shipped and withdrawn. What it means for you is that an agent following the research patterns literally will try to invoke a skill by name, find nothing, and improvise the monitoring or quota step it was told to delegate.
Tools it drives: a file-write tool for .azure/deployment-plan.md and the edit tool for its status field, ask_user for subscription, location and every destructive action, the functions_template_get and Bicep MCP tools where available, and plain HTTPS fetches to the Functions template manifest where they are not. It explicitly refuses to run azd up, azd deploy or terraform apply.
Behavior change, before and after:
| You ask | Without the skill | With the skill |
|---|---|---|
| "Deploy this app to Azure" | Bicep written from memory, then a deploy attempt | A plan file you approve first, generated IaC, and a stop before any deploy command runs |
| "Add a timer-triggered function" | Hand-written Function App Bicep | A template fetched by resource filter, composed onto a base project, with Flex Consumption defaults |
The fine print worth knowing:
- SQL Server Bicep is locked to Entra-only auth. Rule 10 bans
administratorLoginandadministratorLoginPasswordanywhere in the file, including inside a ternary branch, and the reference says a deployment carrying either property name will be rejected. - The repository stores azure-prepare twice, under
skills/and under.github/plugins/azure-skills/skills/, byte-identical across all 166 files. The install brings one copy. - Every
azandazdcommand named here is quoted from the file, not executed. We held no Azure credentials, did not authenticate and created no resources, so claims about what those commands do at runtime are the author's, not ours.
Should you install azure-prepare?
Install it if your Azure work is azd-shaped and you want the plan-approval gate. Repeat the --skill flag to bring azure-validate and azure-deploy in the same command, which we verified works on our August 20, 2026 run, rather than discovering the gap after the Bicep is written. The reference tree is the real product, and on Functions and SQL it encodes defaults that an agent working from memory gets wrong. Skip it for a code-only Python App Service deploy, which the skill's own routing table sends elsewhere before Phase 1 starts, and skip it if you want a single-shot deploy, because the whole design is three gated stages with a file passed between them.
npx skills add https://github.com/microsoft/azure-skills --skill azure-prepare快问快答
How much of the azure-prepare bundle actually gets loaded?
The SKILL.md is 12,862 bytes of a 568,768-byte, 166-file skill at commit 968f7bf (November 14, 2026), and twelve files totalling 76,086 bytes load on every full run as the Phase 1 and Phase 2 spine (a run that hands off to a specialized skill at Step 0 resumes at Phase 1 step 4 and skips three of them). Beyond that, loading is gated on which Azure services you picked. On the file's own worked example, a Container Apps and Cosmos DB web app, 26 files open and 140 do not.
What does azure-prepare write into my repository?
Four kinds of artifact, all in the workspace root rather than a session-state folder: .azure/deployment-plan.md, which rule 1 requires as the agent's very first action; an infra/ directory holding the generated Bicep or Terraform; azure.yaml when the azd recipe is selected; and a Dockerfile per component under src/<component>/. Those files then sit in your tree unapplied, because azure-prepare hands off rather than running anything.
azure-prepare 包含哪些文件?
展开查看原始英文技能文件(共 166 个文件)
正在加载 SKILL.md…
与 azure-prepare 相关的技能有哪些?
Azure Prepare 技能常见问题
Azure Prepare 技能 适合哪些用户?
打算使用 azd 将新应用或存量应用部署到 Azure,需要经过评审的部署计划与自动化基础设施脚手架的开发者。 以下情况建议跳过:非 azd 部署、Python App Service 纯代码部署或跨云迁移(相关场景请转向对应专项技能)。
什么时候应该使用 azure-prepare?
当用户需要为 azd 准备应用、创建 azure.yaml、生成 Bicep/Terraform 或将新应用部署至 Azure 时调用。
azure-prepare 会生成哪些文件?
会生成 .azure/deployment-plan.md 计划文件、./infra/ 下的基础设施代码、供 azd 使用的 azure.yaml,以及位于 src/<component>/Dockerfile 的容器构建文件。
azure-prepare 会直接部署我的应用吗?
不会。它会交接给 azure-validate,且规则明确禁止运行 azd up 或任何部署命令;实际部署由 azure-deploy 技能承担。
为什么它一定要先写部署计划?
部署计划是 azure-validate 与 azure-deploy 读取的单一事实来源,缺少它后续步骤都会失败,因此审批通过前绝不生成代码。
Azure Prepare 安装安全吗?
skills.sh 审计显示已通过 3 项安全扫描中的 2 项。在生产环境安装前,请先查阅本页的安全审计面板。
添加 azure-prepare 徽章
向开发者展示此技能已收录于 Skillselion,可将以下代码粘贴至 README。