安装方式
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add microsoft/azure-skills --skill azure-cost 统一的 Azure 成本管理:查询历史成本,预测未来支出,并进行优化以减少浪费。 适用场景: - "Azure costs" - "Azure spending" - "Azure bill" - "cost breakdown" - "cost by service" - "cost by resource" - "how much am I spending" - "show my bill" - "monthly cost summary" - "cost trends" - "top cost drivers" - "actual cost" - "amortized cost" - "forecast spending" - "projected costs" - "estimate bill" - "future costs" - "budget forecast" - "end of month costs" - "how much will I spend" - "optimize costs" - "reduce spending" - "find cost savings" - "orphaned resources" - "rightsize VMs" - "cost analysis" - "reduce waste" - "unused resources" - "optimize Redis costs" - "cost by tag" - "cost by resource group" - "AKS cost analysis add-on" - "namespace cost" - "cost spike" - "anomaly" - "budget alert" - "AKS cost visibility" 不适用场景: - 部署资源 - 预配基础设施 - 诊断 - 安全审核 - 估算尚未部署的新资源的成本
106.4k
下载量
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add microsoft/azure-skills --skill azure-cost name: azure-cost
description: |-
统一的 Azure 成本管理:查询历史成本,预测未来支出,并进行优化以减少浪费。
适用场景:
- "Azure costs"
- "Azure spending"
- "Azure bill"
- "cost breakdown"
- "cost by service"
- "cost by resource"
- "how much am I spending"
- "show my bill"
- "monthly cost summary"
- "cost trends"
- "top cost drivers"
- "actual cost"
- "amortized cost"
- "forecast spending"
- "projected costs"
- "estimate bill"
- "future costs"
- "budget forecast"
- "end of month costs"
- "how much will I spend"
- "optimize costs"
- "reduce spending"
- "find cost savings"
- "orphaned resources"
- "rightsize VMs"
- "cost analysis"
- "reduce waste"
- "unused resources"
- "optimize Redis costs"
- "cost by tag"
- "cost by resource group"
- "AKS cost analysis add-on"
- "namespace cost"
- "cost spike"
- "anomaly"
- "budget alert"
- "AKS cost visibility"
不适用场景:
- 部署资源
- 预配基础设施
- 诊断
- 安全审核
- 估算尚未部署的新资源的成本
license: MIT
metadata:
author: Microsoft
version: "1.2.1"用于所有 Azure 成本管理任务的统一技能:查询历史成本、预测未来支出以及优化以减少浪费。
当用户想执行以下操作时,激活此技能:
| 属性 | 值 |
|---|---|
| 查询 API 端点 | POST {scope}/providers/Microsoft.CostManagement/query?api-version=2023-11-01 |
| 预测 API 端点 | POST {scope}/providers/Microsoft.CostManagement/forecast?api-version=2023-11-01 |
| MCP 工具 | azuredocumentation、azureextension_cli_generate、azure__get_azure_bestpractices |
| CLI | az rest、az monitor metrics list、az resource list |
| 所需角色 | 成本管理读取者 + 监控读取者 + 作用域上的读取者 |
| 工具 | 描述 | 参数 | 何时使用 |
|---|---|---|---|
azure__documentation | 搜索 Azure 文档 | query(必需):搜索词 | 研究成本管理 API 参数和选项 |
azure__extension_cli_generate | 生成 Azure CLI 命令 | intent(必需):任务描述,cli-type(必需):"az" | 构建用于成本查询的 az rest 命令 |
azure__get_azure_bestpractices | 获取 Azure 最佳实践 | intent(必需):优化上下文 | 结合成本管理最佳实践指导查询设计 |
azure__extension_azqr | 运行 Azure 快速审查合规性扫描 | subscription(必需):订阅 ID,resource-group(可选):资源组名称 | 查找孤立资源和成本优化机会 |
azure__aks | Azure Kubernetes 服务操作 | 视子命令而定 | AKS 成本分析:列出集群、获取节点池、检查配置 |
💡 提示: 优先使用 MCP 工具而不是直接使用 CLI 命令。仅当 MCP 工具无法覆盖特定操作时,才使用 az rest。---
阅读用户请求并按照以下适当的工作流执行。
| 用户意图 | 工作流 | 示例提示 |
|---|---|---|
| 了解当前成本 | [成本查询工作流](cost-query/workflow.md) | “我花了多少钱”、“按服务的成本”、“显示我的账单” |
| 降低成本/查找浪费 | [成本优化工作流](cost-optimization/workflow.md) | “优化成本”、“查找孤立资源”、“减少支出” |
| 预测未来成本 | [成本预测工作流](cost-forecast/workflow.md) | “预测成本”、“月末估算”、“我将花多少钱” |
| 全面成本视图 | 三个工作流结合 | “给我我的 Azure 成本全貌” |
重要: 在优化成本时,请始终将总账单和成本明细与优化建议一同提供。
---
| 作用域 | URL 模式 |
|---|---|
| 订阅 | /subscriptions/<subscription-id> |
| 资源组 | /subscriptions/<subscription-id>/resourceGroups/<resource-group-name> |
| 管理组 | /providers/Microsoft.Management/managementGroups/<management-group-id> |
| 计费帐户 | /providers/Microsoft.Billing/billingAccounts/<billing-account-id> |
| 计费配置文件 | /providers/Microsoft.Billing/billingAccounts/<billing-account-id>/billingProfiles/<billing-profile-id> |
💡 提示: 这些仅是作用域路径——不是完整的 URL。请与 API 端点和版本结合使用。
---
有关完整的成本查询工作流(作用域选择、报告类型、时间范围、数据集配置、API 调用、分页、防护措施、示例和错误处理),请参阅:
📄 [成本查询工作流](cost-query/workflow.md)
---
有关完整的成本优化工作流(先决条件、最佳实践、Redis/AKS 专用分析、Azure 快速审查、资源发现、成本查询、定价验证、利用率指标和报告生成),请参阅:
📄 [成本优化工作流](cost-optimization/workflow.md)
---
有关完整的成本预测工作流(作用域选择、时间段规则、数据集配置、预测专用选项、API 调用、响应解释、防护措施和错误处理),请参阅:
📄 [成本预测工作流](cost-forecast/workflow.md)
---
az costmanagement query 更可靠)ClientType: GitHubCopilotForAzure 标头(在 az rest 中使用 --headers "ClientType=GitHubCopilotForAzure")x-ms-ratelimit-microsoft.costmanagement-*-retry-after 标头(qpu-retry-after、entity-retry-after、tenant-retry-after),等待最长的值,并在该持续时间过去之前不要重试。每个作用域的限制(每分钟 4 个请求)是最严格的。az rest,而不是 az costmanagement query