Community编程与开发github.com

microsoft/azure-app-onboard-prereq

评估源代码是否准备好部署到 Azure — 在基础设施规划之前的检查。评估构建健康度、应用完整性、依赖项和本地服务、堆栈兼容性以及部署可行性。回答有关应用在部署之前需要什么的问题——框架、依赖项和配置。检查依赖项是否兼容并识别部署阻塞器和不受支持的框架。

azure-app-onboard-prereq 是什么?

此技能用于在基础设施规划之前,评估用户仓库的构建健康度、应用完整性和 Azure 部署可行性。它生成每个组件的判定结果(通过/警告/失败),供下游阶段使用。作为 `azure-app-onboard` 流水线(共 4 个阶段)的第 1 阶段,它通过静态分析检测项目文件、识别组件和检测到的服务,并评估构建配置、应用完整性和可部署性。该技能支持通过直接入口或由协调器调用,并强制使用只读评估流程,禁止所有安装、构建或测试命令。输出包含每个组件的构建要求和总体就绪状态,帮助开发人员在投入基础设施工作之前识别部署阻塞器、不兼容的依赖项和不受支持的框架。它适用于使用 Visual Studio Code、GitHub Copilot 和 Azure 扩展的开发者。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/microsoft/azure-skills/tree/main/skills/azure-app-onboard-prereq

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Azure 应用载入前提条件 — 仓库评估

评估用户的仓库的构建健康度、应用完整性和 Azure 部署可行性 — 在基础设施规划之前。生成供下游阶段使用的每个组件判定结果(通过/警告/失败)。

协调器关系: 由 azure-app-onboard 在第 3 步调用,或作为代码就绪检查独立运行。当由协调器调用时,在写入工件后将控制权返回给 azure-app-onboard — 不要直接调用下游阶段。

AppOnboard 流水线的阶段 1/4。会话:.copilot-azure/sessions/{session-id}/。读取 context.json。写入 components[]、repo{}、detectedInfra[]。生成 prereq-output.json。架构:prereq-schemas.ts — PrereqOutput、BuildRequirements。支持直接入口。

何时不使用

信号重定向
验证基础设施(Bicep/TF/azure.yaml)azure-validate
生成 IaCazure-prepare
端到端从创意到生产azure-app-onboard
运行 azd up 或部署azure-deploy

规则

⛔ 绝对禁止 — npm install、npm test、npx jest、pytest 以及所有安装/构建/测试命令绝不允许。 在任何情况下,您都不得在前提条件阶段运行 npm install、npm test、npx jest、pip install、pytest、dotnet build、dotnet restore、dotnet test、go mod download、cargo build 或任何包管理器安装、构建或测试命令。不要运行测试套件来验证代码 — 改为静态检查测试配置文件。前提条件阶段是只读评估 + 仅静态验证。 唯一的例外 — 两个经许可的上下文,均需征得同意: (a) 代理在迁移/补救期间修改的代码(请参见 remediation-protocol.md 第 6 步),或 (b) 代理在零代码路径上从头编写的代码(请参见 zero-code-path.md)。在这两种情况下,安装/构建/测试仅在用户确认的构建验证门(build-check.md 第 3 步)之后运行,并在用户回答该特定逐命令的同意提示之后。一般预先同意永远不算。

  1. ⛔ 完整流水线(第 1-8 步),无例外。 所有提示 → 直接进入第 1 步。作为调查结果的一部分(第 5 步)回答具体问题,而不是在此之前。
  2. ⛔ 评估不使用子代理。 三轴评估为内联。例外: 零代码路径搭建(第 2 步)。
  3. 代码/破坏性修改需要 ask_user。在结果之前最多 3 个问题。直接入口:不要重复协调器的意图问题。

MCP 工具

工具用途
mcp_azure_mcp_get_azure_bestpractices根据 Azure 最佳实践验证检测到的堆栈模式
mcp_azure_mcp_extension_cli_install检查/安装所需的 CLI 工具(az、azd、func)

工作流

第 1 步:会话检查

协调器入口: 会话存在 — 读取 context.json,继续执行第 2 步。

直接入口: 检查 .copilot-azure/sessions/active-session.json:

  • 存在 → ⛔ 阅读 session-protocol.md 以了解恢复/全新入口。在用户回答之前,不要继续。
  • 缺失 → 创建会话:生成 UUID,New-Item -ItemType Directory -Path ".copilot-azure/sessions/{uuid}" -Force,通过 create 工具写入 context.json + active-session.json。

然后:az account show → 将 {id, name, tenantId} 合并到 context.json.azure 中。⛔ 在任何扫描之前,会话必须存在于磁盘上。

第 2 步:扫描工作区

扫描项目文件。检测组件、repo{}、detectedInfra[]、detectedServices[]。对 Terraform 提供程序进行分类。检查 CLI 可用性。堆栈检测冲突:用户显式声明胜出(写入 context.json,将扫描标记为覆盖);仅扫描 → 向用户确认;多个堆栈 → 显示所有并要求(请参见 component-mapping.md);无代码 → zero-code-path.md。

如果没有项目文件、没有 Dockerfile 并且没有 index.html → ⛔ 阅读 zero-code-path.md。

⛔ Cloud SDK 早期门控。 搜索 aws-sdk|@aws-sdk|boto3|google-cloud|@google-cloud|firebase。如果发现功能依赖项 → 阅读 cloud-sdk-migration.md,然后 ask_user:“重定向到 Azure Cloud Migrate”(设置 routeToSkill: "azure-cloud-migrate")· “无论如何继续评估”(完成就绪评估 + SDK→Azure 映射,然后在第 8 步停止 — 直到交换依赖项才制定计划)· “取消”。

第 3 步:每个组件评估

子步骤操作参考
3.1构建检查⛔ 您必须阅读 build-check.md
3.2完整性检查⛔ 您必须阅读 completeness-check.md
3.3可部署性检查⛔ 您必须阅读 deployability-check.md
3.3a组件映射(有条件)仅当找到 >1 个项目清单(monorepo)时,才阅读 component-mapping.md

评估后填充每个组件的 buildRequirements。判定传播、层级规则和 f1Viable 聚合在 readiness-gate.md 和各个检查参考中。

第 4 步:写入工件 + 就绪门控

⛔ 验证 context.json 存在于磁盘上。阅读 readiness-gate.md(判定、层级、批量然后批准、快速通道),然后阅读 prereq-artifacts.md(写入过程、架构)。

第 5 步:呈现调查结果

根据 readiness-gate.md § 呈现调查结果 — 在继续之前,按严重性分组显示判定。

第 6 步:补救(有条件)

⛔ 如果存在任何 ❌ 失败判定、🔧 建议修复或 ⚠️ 带有 fixPhase: "prereq" 的警告,则必须阅读 remediation-protocol.md。包含补救循环、静态验证、重新评估命令、补救后的工件更新以及构建验证同意门。如果所有判定均为 ✅ 通过或 ⚠️ 警告且无 fixPhase: "prereq",则跳到第 7 步。

第 7 步:写入最终状态

completedPhases 已经包含 "prereq" + currentPhase: null(来自第 4 步)。然后:

⛔ 写入 lastScanCommit。 运行 git rev-parse HEAD 并将完整的 40 个字符的 SHA 存储为 context.json.repo.lastScanCommit。必需 — 第 1 步中的过期保护会将其与恢复时的 HEAD 进行比较以检测更改。

第 8 步:路由

⛔ 强制 — 不要跳过此步骤。

路由字段: 所有路由都将 routeToSkill 和 routeReason 写入 context.json。

补救后上下文: 如果执行了第 6 步,则用以下内容引导路由提示:“补救完成 — 修复了 {N} 个问题,您的应用现在为 {overallHealth}。”

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

microsoft/airunway-aks-setup

Agent skill 'airunway-aks-setup' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/appinsights-instrumentation

Agent skill 'appinsights-instrumentation' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-ai

Agent skill 'azure-ai' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-aigateway

Agent skill 'azure-aigateway' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-app-onboard

Agent skill 'azure-app-onboard' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cloud-migrate

Agent skill 'azure-cloud-migrate' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-compliance

Agent skill 'azure-compliance' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-compute

Agent skill 'azure-compute' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cost

Agent skill 'azure-cost' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cost-optimization

Identify Azure cost savings from usage and spending data. USE FOR: optimize Azure costs, reduce Azure spending/expenses, analyze Azure costs, find cost savings, generate cost optimization report, identify orphaned resources to delete, rightsize VMs, reduce waste, optimize Redis costs, optimize storage costs, AKS cost analysis add-on, namespace cost, cost spike, anomaly, budget alert, AKS cost visibility. DO NOT USE FOR: deploying resources (use azure-deploy), general Azure diagnostics (use azure-diagnostics), security issues (use azure-security)

microsoft/azure-deploy

Agent skill 'azure-deploy' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-diagnostics

Agent skill 'azure-diagnostics' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-enterprise-infra-planner

Agent skill 'azure-enterprise-infra-planner' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-hosted-copilot-sdk

Build, deploy, and modify GitHub Copilot SDK apps on Azure. MANDATORY when codebase contains @github/copilot-sdk or CopilotClient in package.json. PREFER OVER azure-prepare when copilot-sdk markers detected. WHEN: copilot SDK, @github/copilot-sdk, copilot-powered app, build copilot app, prepare copilot app, add feature to copilot app, modify copilot app, BYOM, bring your own model, CopilotClient, createSession, sendAndWait, azd init copilot. DO NOT USE FOR: deploying already-prepared copilot-sdk apps (use azure-deploy), general web apps without copilot SDK (use azure-prepare), Copilot Extensions, Foundry agents (use microsoft-foundry).

microsoft/azure-kubernetes

Agent skill 'azure-kubernetes' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-kusto

Agent skill 'azure-kusto' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-messaging

Agent skill 'azure-messaging' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-observability

Azure Observability Services including Azure Monitor, Application Insights, Log Analytics, Alerts, and Workbooks. Provides metrics, APM, distributed tracing, KQL queries, and interactive reports. USE FOR: Azure Monitor, Application Insights, Log Analytics, Alerts, Workbooks, metrics, APM, distributed tracing, KQL queries, interactive reports, observability, monitoring dashboards. DO NOT USE FOR: instrumenting apps with App Insights SDK (use appinsights-instrumentation), querying Kusto/ADX clusters (use azure-kusto), cost analysis (use azure-cost-optimization).

microsoft/azure-postgres

azure-postgres — an installable skill for AI agents.

microsoft/azure-prepare

Agent skill 'azure-prepare' from microsoft/azure-skills. Use when the task matches this skill's domain.

相关技能