cost-analysis

cost-analysis is a skill for Claude Code from microsoft/skills. It costs 98 tokens per session (446 once invoked), scanned A, original, MIT.

A guide to analyzing actual Azure spending, including changes in bills and costs from AKS or AI services. AKS is Azure Kubernetes Service, which runs groups of containers in the cloud.

In plain words
What is it for?
Use it to break down historical spend, investigate cost spikes, find expensive resources, and examine AKS, namespace, or AI-service costs.
Why use it?
It helps separate measured charges from guesses about why costs changed. It also handles missing data, access problems, currencies, and incomplete result sets explicitly.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the azure-cost plugin — 4 skills, 1 MCP server shipped together

Good fit Use it to break down historical spend, investigate cost spikes, find expensive resources, and examine AKS, namespace, or AI-service costs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/skills/cost-analysis
About the project

microsoft/skills is a collection of skills, custom agents, AGENTS.md templates, plugins, hooks, commands, and MCP configurations that give AI coding agents context for Azure SDK and Microsoft AI Foundry development. Developers use it to install selected domain-specific guidance into coding-agent environments. The catalogue entries are the repository’s own agent resources and supporting configurations.

microsoft/skills · 3,056 stars · on GitHub · microsoft.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add microsoft/skills --skill cost-analysis
Clone the repo
git clone --depth 1 https://github.com/microsoft/skills

Made for: Claude Code.

Or install azure-cost, the plugin that ships this one along with the rest of its 4 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cost-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/skills/cost-analysis/github.svg)](https://agentmods.dev/skills/microsoft/skills/cost-analysis)
Your own site
<a href="https://agentmods.dev/skills/microsoft/skills/cost-analysis"><img src="https://agentmods.dev/badge/skills/microsoft/skills/cost-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cost-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/skills/cost-analysis"><img src="https://agentmods.dev/badge/skills/microsoft/skills/cost-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 446 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00098 $0.00446
Opus 5.5 $0.00039 $0.00178
Sonnet 5 $0.00020 $0.00089
Haiku 4.5 $0.00010 $0.00045

Measured 3d ago against content hash a3708374c3c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-26, from the pricing page.

Security

Grade A, and why

cost-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.github/plugins/azure-cost/skills/cost-analysis/SKILL.md · 47 lines

What it actually says

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.
  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.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 47 lines · 98 tokens per session scan A a3708374c3c6

Subscribe to this mod's changes

cost-analysis is a skill published in the GitHub repository microsoft/skills (3,056 stars, last pushed 2d ago), licensed MIT. It adds 98 tokens to every session and 446 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-24.

Related

Other skills, from other repositories

Commitment Discount Strategist

Cross-cloud commitment portfolio specialist. Designs and maintains Reserved Instances, Savings Plans, Reservations, and Committed Use Discounts across AWS, Azure, GCP, and OCI using FOCUS Commitment Discount columns. Maximizes effective discount without bleeding on unused commitment.

Cletrics/finops-agents · 55 tokens

Budget & Anomaly Operator

Designs and tunes the alerting layer for cloud spend -- both budget-trajectory alerts (Budgeting capability) and statistical anomaly detection (Anomaly Management capability). Optimizes for precision and time-to-action, not coverage.

Cletrics/finops-agents · 50 tokens

AWS Cost Explorer Analyst

Expert analyst for AWS Cost Explorer, Cost and Usage Report (CUR), and Cost Categories. Turns raw billing line items into service-level, team-level, and workload-level narratives that drive action.

Cletrics/finops-agents · 43 tokens

Cost Anomaly Detector

Builds and tunes anomaly detection for cloud spend -- z-score, seasonal decomposition, and segment-aware baselines that surface real issues without drowning teams in false positives.

Cletrics/finops-agents · 37 tokens

GCP Billing Interpreter

Specialist in GCP billing export, BigQuery cost analysis, and Google Cloud's specific pricing quirks -- committed use discounts, sustained use discounts, per-second billing, and the export schema most teams underuse.

Cletrics/finops-agents · 48 tokens

FOCUS Data Engineer

End-to-end ingest, transform, and conformance specialist for FOCUS-shaped cost datasets. Handles AWS CUR 2.0, Azure Cost Management exports, GCP billing export, OCI cost & usage, and SaaS billing. Operates the FOCUS Validator and Requirements Analyzer; orchestrates parallel-run migrations.

Cletrics/finops-agents · 67 tokens