3.1k microsoft

cost-analysis Skill

分析实际 Azure 支出、账单变化以及 AKS 或 AI 成本。适用场景:"Azure 成本明细"、"最贵的资源"、"账单为什么涨了"、"成本激增"、"意外扣费"、"Cosmos DB 扣费"、"Foundry 模型成本"、"AKS 集群成本"、"命名空间成本"、"启用 AKS 成本分析"、"闲置的 AKS 容量"。不适用于:预测、价格估算、资源规格调整、承诺消费或预算。

安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。

查看源码

技能指令原文(SKILL.md)

Azure Cost Analysis

Quick Reference

| Intent | Workflow | Primary tools |
|--------|----------|---------------|
| Query historical spend | Cost query | query_costs |
| Explain a spike | Cost investigation | query_costs, Resource Graph |
| Analyze AKS spend | AKS cost analysis | query_aks_costs, Resource Graph |
| Analyze AI service spend | AI cost analysis | query_costs |

When to Use This Skill

Use for spend, anomalies, and AKS or AI allocation.

MCP Tools

Use cost tools and Resource Graph first. If an operation is unavailable, follow
fallback and safety.

Workflow

  1. Confirm scope, period, currency, and breakdown.
  2. Load only the matching workflow above.
  3. Never transform MCP results in a shell or interpreter; request tool-side

totals, grouping, sorting, or bounded follow-up queries.

  1. Respect row limits and label incomplete data.
  2. Separate measured cost from inferred causes and recommendations.

Error Handling

| Error | Action |
|-------|--------|
| Access denied | Name the required scope and role. |
| Empty result | Distinguish no data from unavailable data. |
| Multiple currencies | Report each currency separately. |
| Server error | Retry once; then stop with the trace ID. |