mcpField
C
cost-analysis

cost-analysis

github.com/microsoftCloud & DevOps1.6k214 installsUpdated today
Repository

About cost-analysis

A skill for analyzing Azure spending, including historical costs, anomalies, and AKS or AI service allocation. It guides users through scoped queries and careful reporting of measured costs versus inferred causes.

Key features

  1. 01Historical spend queries
  2. 02Cost spike investigation
  3. 03AKS cost analysis
  4. 04AI service cost analysis
  5. 05Scoped reporting and error handling

Use cases

  1. 01Review spending over a selected period
  2. 02Investigate a cost anomaly
  3. 03Analyze AKS or AI service allocation

MCP support

Uses cost tools and Resource Graph for cost queries and investigations. It instructs users to rely on tool-side aggregation and bounded follow-up queries.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/microsoft/azure-skills --skill cost-analysis

After installing, type/cost-analysisin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
ai-cost-analysis.md
aks-anomaly.md
aks-cost-analysis.md
aks-enablement.md
cost-investigation.md
tools-and-safety.md
references/cost-query/
dimensions-by-scope.md
error-handling.md
examples.md
guardrails.md
request-body-schema.md
workflow.md

Details

From the project README

Azure Cost Analysis

Quick Reference

IntentWorkflowPrimary tools
Query historical spendCost queryquery_costs
Explain a spikeCost investigationquery_costs, Resource Graph
Analyze AKS spendAKS cost analysisquery_aks_costs, Resource Graph
Analyze AI service spendAI cost analysisquery_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

ErrorAction
Access deniedName the required scope and role.
Empty resultDistinguish no data from unavailable data.
Multiple currenciesReport each currency separately.
Server errorRetry once; then stop with the trace ID.

Comments

Markdown supported