cost-change-investigation

cost-change-investigation is a skill for Claude Code from costory-io/costory-finops-mcp-skills. It costs 57 tokens per session (1,945 once invoked), scanned A, original, Apache-2.0.

A FinOps investigation workflow for explaining why a cost changed. It gathers evidence about timing, usage, metrics, events, alerts, and terminology, then produces summaries for clients and developers.

In plain words
What is it for?
Use it to investigate what changed, when it changed, and which factors contributed, using Costory context, queries, metrics, events, and alerts.
Why use it?
It helps separate supported cost drivers from guesses and connects spending changes with the usage or events that may explain them.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the costory plugin — 7 skills shipped together

Good fit Use it to investigate what changed, when it changed, and which factors contributed, using Costory context, queries, metrics, events, and alerts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/costory-io/costory-finops-mcp-skills/cost-change-investigation
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 costory-io/costory-finops-mcp-skills --skill cost-change-investigation
Clone the repo
git clone --depth 1 https://github.com/costory-io/costory-finops-mcp-skills

Made for: Claude Code.

Or install costory, the plugin that ships this one along with the rest of its 7 skills.

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-change-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/costory-io/costory-finops-mcp-skills/cost-change-investigation/github.svg)](https://agentmods.dev/skills/costory-io/costory-finops-mcp-skills/cost-change-investigation)
Your own site
<a href="https://agentmods.dev/skills/costory-io/costory-finops-mcp-skills/cost-change-investigation"><img src="https://agentmods.dev/badge/skills/costory-io/costory-finops-mcp-skills/cost-change-investigation/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-change-investigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/costory-io/costory-finops-mcp-skills/cost-change-investigation"><img src="https://agentmods.dev/badge/skills/costory-io/costory-finops-mcp-skills/cost-change-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,945 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.00057 $0.01945
Opus 5 $0.00028 $0.00972
Sonnet 5 $0.00011 $0.00389
Haiku 4.5 $0.00006 $0.00194

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

Security

Grade A, and why

cost-change-investigation 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 12d 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.

plugins/costory/skills/cost-change-investigation/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cost Change Investigation

Role

You are a senior FinOps lead explaining a cost change to stakeholders.

Goal

  • Explain what changed, when, and the best-supported driver(s).
  • Produce a short client-facing summary and a developer-facing methodology.

What The Client Sees

The client sees the specific group-by label, numeric cost change, original cost, new cost, and the summary you generate.

Example:

  • AmazonAthena : +$2.66K, +8.29%, $32.05K → 34.71K | Costs increased because of ....

Rules:

  • Never mention numeric cost-change values already displayed for the client.
  • You may mention cost or usage metrics for the specific factor(s) that explain the change, for example:
    • Costs increased because of a 3x increase in Athena query usage.
    • Spending increased by $2500 in "specific api type".

Workflow

  1. Call MCP get_context first. Use query, search, list_events, list_alerts, list_metrics, and suggest_usage_metrics only when they add context, validate a driver, explain timing, or connect cost to usage.
    • list_metrics and suggest_usage_metrics only discover what exists; query is how you actually pull them, as extra series alongside the cost ones ({"type": "metric", "metricId": ...} for business metrics, {"type": "usage", ...} for usage metrics), so a driver can be backed by the usage or business volume behind it.
    • list_alerts and list_events surface operational context (deployments, incidents, config changes) that can explain timing; check their content against the scenario, not just their dates.
  2. Use lookup_term_context(query=...) before relying on an unfamiliar or ambiguous term, column/group-by value, alert, event, metric, or phrase.
  3. Complete the analysis:
    • Call suggest_groupby() first. Choose relevant columns you want to investigate using max_prop_diff, top_changed, nunique, and total_cost.
    • Call find_cost_change_factors(columns=[...]) using the selected columns returned by the group-by suggestions. Retain its comparison_periods and where_clause.
    • Choose useful, non-obvious contributor_candidates using magnitude and nesting evidence.
    • Get timing evidence from MCP query: one cost series for the whole scenario scope, plus one series per contributor you want to time. Write each series' filterCel yourself, following "Building filterCel" below. Set from/to from comparison_periods, aggBy: "Day", and analyze: {"changePoint": true}. Keep it to at most 6 contributor series per call.
    • Read timing back from the response's changePoint entries, matching queryName to the series name you sent.
    • If weekend seasonality may hide some patterns, rerun the same call with ignoreWeekends and compare the evidence.
  4. Compare results with MCP evidence.
  5. Merge the strongest contribution, timing, terminology, and MCP evidence.

Read the full file on GitHub · 111 lines

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. 12d ago First seen · 111 lines · 57 tokens per session scan A 997ad8eb895b

Subscribe to this mod's changes

cost-change-investigation is a skill published in the GitHub repository costory-io/costory-finops-mcp-skills (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,945 once invoked, about $0.0003 per session on Opus 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-08-31.

Related

Other skills, from other repositories

querying-well-data

How to query a Well workspace correctly — discover the schema first, then query the right root. Use whenever the user asks about their invoices, companies, contacts, bank transactions, accounts, or accounting ledger in Well, or before writing any wellqueryrecords call.

WellApp-ai/Well · 58 tokens

ar-aging

Produce an accounts-receivable aging report and surface overdue invoices for a Well workspace. Use when the user asks who owes them money, an AR aging report, overdue invoices, days sales outstanding (DSO), or which customers to chase.

WellApp-ai/Well · 51 tokens

balance-sheet

Build a balance sheet (bilan) from a Well workspace. Use when the user asks for a balance sheet, bilan, assets/liabilities/equity, or financial position at a point in time.

WellApp-ai/Well · 44 tokens

cash-flow-forecast

Forecast cash flow and runway for a Well workspace from booked invoices and collected bank transactions. Use when the user asks for a cash-flow forecast, runway, how long until they run out of cash, projected balance, or expected inflows/outflows.

WellApp-ai/Well · 54 tokens

compte-de-resultat

Build a profit & loss statement (compte de résultat / income statement) from a Well workspace. Use when the user asks for a P&L, income statement, compte de résultat, revenue vs expenses, or net result over a period.

WellApp-ai/Well · 55 tokens

month-end-close

Run a month-end (or period) close checklist against a Well workspace — verify everything is reconciled and posted before the books are closed. Use when the user asks to close the month/period, run a close checklist, check if the books are ready to close, or what's left before closing.

WellApp-ai/Well · 64 tokens