Community程式設計與開發github.com

microsoft/azure-app-onboard-prereq

評估原始碼是否準備好部署到 Azure — 在基礎設施規劃之前的檢查。評估建置健康狀態、應用程式完整性、相依性與本機服務、堆疊相容性與部署可行性。回答有關應用程式在部署之前需要什麼的問題 — 框架、相依性和組態。檢查相依性是否相容,並識別部署阻礙和不支援的框架。

azure-app-onboard-prereq 是什麼?

此技能會在使用者的儲存庫上執行預先需求評估,以判斷其對 Azure 部署的準備程度。它會以靜態方式掃描專案檔案和組態,以識別元件、偵測雲端 SDK,並評估建置健康狀態、應用程式完整性和部署可行性。這是 Azure App Onboard 管線的第一階段,會產生由後續階段使用的通過/警告/失敗元件 verdict。此技能強制執行嚴格的唯讀評估規則,禁止安裝、建置或測試命令,但使用者同意的特定移轉案例除外。它會使用 MCP 工具來驗證 Azure 最佳做法和 CLI 可用性,並產生結構化輸出 (prereq-output.json),以總結發現結果和必要的修復措施。

相容平台~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 App Onboard Prereq — 儲存庫評估

評估使用者的儲存庫在建置健康狀態、應用程式完整性和 Azure 部署可行性方面的狀況 — 在基礎設施規劃之前。產生由下游階段使用的個別元件 verdict (通過/警告/失敗)。

協調器關係: 由 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) 代理程式在遷移/補救期間修改的程式碼 (請參閱 補救協定.md 步驟 6),或 (b) 代理程式在零程式碼路徑上從頭編寫的程式碼 (請參閱 零程式碼路徑.md)。在任何一種情況下,安裝/建置/測試僅能透過使用者確認的建置驗證檢查 (建置檢查.md 步驟 3) 執行,且僅在使用者回答該特定命令的同意提示之後。一般事先同意永遠不算數。

  1. ⛔ 完整管線 (步驟 1–8),無例外。 所有提示直接導向步驟 1。在步驟 5 中作為發現結果的一部分回答特定問題,而不是之前。
  2. ⛔ 評估不使用子代理程式。 三軸評估是內嵌的。例外: 零程式碼路徑 scaffolding (步驟 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:

  • 存在 → ⛔ 閱讀 工作階段協定.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,標記掃描為覆寫);僅限掃描 → 與使用者確認;多個堆疊 → 顯示所有堆疊並詢問 (請參閱 元件對應.md);無程式碼 → 零程式碼路徑.md。

如果沒有專案檔案、沒有 Dockerfile 且沒有 index.html → ⛔ 閱讀 零程式碼路徑.md。

⛔ 雲端 SDK 早期檢查。 搜尋 aws-sdk|@aws-sdk|boto3|google-cloud|@google-cloud|firebase。如果找到功能性相依性 → 閱讀 雲端 SDK 遷移.md,然後 ask_user:「重新導向至 Azure 雲端遷移」 (設定 routeToSkill: "azure-cloud-migrate") · 「無論如何繼續評估」 (完成就緒評估 + SDK→Azure 對應,然後在第 8 步驟停止 — 在相依性被交換之前不制定計畫) · 「取消」。

步驟 3:每個元件的評估

子步驟動作參考資料
3.1建置檢查⛔ 你必須閱讀 建置檢查.md
3.2完整性檢查⛔ 你必須閱讀 完整性檢查.md
3.3可部署性檢查⛔ 你必須閱讀 可部署性檢查.md
3.3a元件對應 (條件式)僅在找到 >1 個專案資訊清單 (monorepo) 時閱讀 元件對應.md

在評估後填充每個元件的 buildRequirements。Verdict 傳播、層級規則和 f1Viable 聚合在 就緒檢查.md 和個別檢查參考資料中說明。

步驟 4:寫入成品 + 就緒檢查

⛔ 驗證 context.json 存在於磁碟上。閱讀 就緒檢查.md (verdict、層級、批次然後核准、快速通道),然後閱讀 預先需求成品.md (寫入程序、結構描述)。

步驟 5:呈現發現結果

依照 就緒檢查.md § 呈現發現結果 — 在繼續之前顯示按嚴重性分組的 verdict。

步驟 6:補救 (條件式)

⛔ 如果存在任何 ❌ 失敗 verdict、🔧 建議修正,或帶有 fixPhase: "prereq" 的 ⚠️ 警告,你必須閱讀 補救協定.md。包含補救迴圈、靜態驗證、重新評估指令、補救後成品更新,以及建置驗證同意檢查。如果所有 verdict 都是 ✅ 通過或 ⚠️ 警告且不含 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.

相關技能