Skill 寫法圖鑑

azure-advisor-actionability

Microsoft | 雲端與基礎設施 | 原文 | MIT

取得並呈現 Azure Advisor 建議的修復步驟,不自動執行

中文翻譯

---
name: azure-advisor-actionability
description: "修復 Azure Advisor 的建議。WHEN: \"fix Advisor recommendation\"。"
license: MIT
metadata:
  author: Microsoft
  version: "1.0.1"
---

# Azure Advisor 可執行修復

## 速查

把修復方式呈現給客戶自己執行;沒有明確確認絕對不要執行。需要 `recommendationTypeId` GUID 和完整的受影響 `resourceId`;已知的值就重複使用,缺的就問,絕對不要猜。

`resourceId` 從使用者那邊取得,或從 `advisor_recommendation_list` 回傳的受影響資源紀錄中精確取得。有歧義就問是哪個資源;絕對不要使用建議的 instance ID。

## 流程

1. 只用 `recommendationTypeId` 呼叫一次 `advisor_remediation_get`,絕對不要帶 `resourceId`,之後才產生指引或代入數值。
2. 遇到 `RemediationNotFound`、空回應或沒有可用的修復方式時,說明 Advisor 的修復方式不可用。去取得相關的公開 Microsoft Learn 文件;如果不知道是什麼建議,就請使用者提供建議說明。如果都找不到,就直說;絕對不要編造指引。其他工具錯誤要回報,但不要透露內部細節,也不要當作空結果。
3. 只使用回傳的修復方式或取得的 Learn 指引,包括警告和驗證步驟。
4. 取得之後,從確切的受影響 `resourceId` 或已確認的 context 代入沒有歧義的佔位符:subscription、resource group、資源名稱、完整的 resource ID。無法解析的佔位符要保留並說明。
5. 保留步驟順序;Azure CLI 和 PowerShell 分開寫。

遇到 Advisor 的 `guidance` 就不要產生指令。遇到 `hybrid` 或 `executable`,要包含每一個手動、決策和指令步驟。省略原始 JSON 和內部標籤。

## 最終回應

標明來源:「Guidance source: Azure Advisor remediation tool」或「Guidance source: publicly available Microsoft Learn documentation」,並附上取得的 `learn.microsoft.com` 引用。絕對不要把備援指引說成來自 Advisor,也不要宣稱已經執行。

英文原文

---
name: azure-advisor-actionability
description: "Remediate Azure Advisor recommendations. WHEN: \"fix Advisor recommendation\"."
license: MIT
metadata:
  author: Microsoft
  version: "1.0.1"
---

# Azure Advisor Actionability

## Quick reference

Present remediation for the customer to run; never execute without explicit confirmation. Require the `recommendationTypeId` GUID and complete affected `resourceId`; reuse known values, ask for missing values, never guess.

Get `resourceId` from the user or an exact `advisor_recommendation_list` affected-resource record. Ask which resource if ambiguous; never use a recommendation instance ID.

## Workflow

1. Call `advisor_remediation_get` once with only `recommendationTypeId`, never `resourceId`, before generating guidance or substituting values.
2. For `RemediationNotFound`, empty responses, or no usable remediation, state that Advisor remediation is unavailable. Retrieve relevant public Microsoft Learn documentation; ask for the recommendation description if unknown. If none is available, say so; never invent guidance. Report other tool errors without internals, not as empty results.
3. Use only returned remediation or retrieved Learn guidance, including warnings and verification.
4. After retrieval, substitute unambiguous placeholders from the exact affected `resourceId` or confirmed context: subscription, resource group, resource names, full resource ID. Preserve and describe unresolved placeholders.
5. Preserve step order; separate Azure CLI and PowerShell.

For Advisor `guidance`, do not generate commands. For `hybrid` or `executable`, include every manual, decision, and command step. Omit raw JSON and internal labels.

## Final response

Label the source: "Guidance source: Azure Advisor remediation tool" or "Guidance source: publicly available Microsoft Learn documentation" with retrieved `learn.microsoft.com` citations. Never attribute fallback guidance to Advisor or claim execution.