Skill Press

No. 300 · cost-analysis

Azure Cost Analysis

A field guide from Microsoft

Microsoft

When to use it

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.

Rank
No. 300 of 971
Installs
Not listed yet
Runs in
GitHub Copilot
Length
202 words · 1 min
Files
14
License
MIT

Get this skill

Download the skill folder (.zip, 16 KB) ↓ · SKILL.md only ↓

Agent prompt

Paste into a coding agent with terminal access. Check the upstream requirements for the skill you’re installing.

Prompt
Install the "cost-analysis" Agent Skill by Microsoft, from https://github.com/microsoft/skills.

1. Fetch the whole folder .github/plugins/azure-cost/skills/cost-analysis — SKILL.md plus every script, reference, and asset beside it, not just SKILL.md. For example:
   skill_checkout=$(mktemp -d)
   git init "$skill_checkout"
   git -C "$skill_checkout" fetch --depth 1 https://github.com/microsoft/skills.git b35d2c60fac796bfd2cfd14ad3f550c73e92d9bb
   git -C "$skill_checkout" checkout --detach FETCH_HEAD
2. Copy it into your skills directory as a folder named "cost-analysis":
   - Claude Code: ~/.claude/skills/cost-analysis/ (all projects) or .claude/skills/cost-analysis/ (this project only)
   - Another agent: the directory you load Agent Skills from (folders containing a SKILL.md)
3. Check that cost-analysis/SKILL.md exists and its frontmatter says name: cost-analysis.
4. Read SKILL.md, then tell me in two or three sentences what the skill does and when it will trigger, and list any dependencies it mentions (Python packages, npm packages, CLIs) that aren't installed yet. Don't install them without asking.

skills CLI

One command; the skills.sh installer detects your agents (Claude Code, Cursor, Codex, and more).

Terminal
npx skills add https://github.com/microsoft/skills/tree/b35d2c60fac796bfd2cfd14ad3f550c73e92d9bb/.github/plugins/azure-cost/skills/cost-analysis --skill cost-analysis

Contents

  1. Quick Reference
  2. When to Use This Skill
  3. MCP Tools
  4. Workflow
  5. Error Handling

The skill, in full

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.
  4. Respect row limits and label incomplete data.
  5. 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.

More in Cloud & Infrastructure

All Cloud & Infrastructure skills →

More from Microsoft

From microsoft/skills at b35d2c6, MIT. Install counts from skills.sh.