Cost Analysis skill for Claude
Analyze actual Azure spend, bill changes, and AKS or AI costs. WHEN: \"Azure cost breakdown\", \"most expensive resources\", \"why did my bill increase\", \"cost spike\", \"unexpected charge\", \"Cosmos DB charges\", \"Foundry model costs\", \"AKS cluster cost\", \"namespace cost\", \"enable AKS cost analysis\", \"idle AKS capacity\". DO NOT
When Claude uses it
USE FOR: forecasts, pricing estimates, rightsizing, commitments, or budgets.
Cost Analysis SKILL.md
The full skill file from microsoft/skills (MIT).
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
- Confirm scope, period, currency, and breakdown.
- Load only the matching workflow above.
- Never transform MCP results in a shell or interpreter; request tool-side totals, grouping, sorting, or bounded follow-up queries.
- Respect row limits and label incomplete data.
- 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. |
How to install Cost Analysis
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit microsoft/skills/.github/plugins/azure-cost/skills/cost-analysis#main ~/.claude/skills/cost-analysisCodex
npx degit microsoft/skills/.github/plugins/azure-cost/skills/cost-analysis#main ~/.codex/skills/cost-analysisClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What does the Cost Analysis skill do?
Analyze actual Azure spend, bill changes, and AKS or AI costs. WHEN: \"Azure cost breakdown\", \"most expensive resources\", \"why did my bill increase\", \"cost spike\", \"unexpected charge\", \"Cosmos DB charges\", \"Foundry model costs\", \"AKS cluster cost\", \"namespace cost\", \"enable AKS cost analysis\", \"idle AKS capacity\". DO NOT USE FOR: forecasts, pricing estimates, rightsizing, commitments, or budgets.
+How do I install Cost Analysis in Claude Code?
Copy the skill folder into ~/.claude/skills/cost-analysis, for example with "npx degit microsoft/skills/.github/plugins/azure-cost/skills/cost-analysis#main ~/.claude/skills/cost-analysis". Claude Code loads it automatically and uses it when a task matches.
+Does Cost Analysis work with ChatGPT or Codex?
Yes. Cost Analysis uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/cost-analysis. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is Cost Analysis free?
Cost Analysis is published on GitHub by microsoft under the MIT license, which allows free use.