aws-cost-investigation

aws-cost-investigation is a skill for Claude Code from Goodsmileduck/claude-registry. It costs 135 tokens per session (5,084 once invoked), scanned A, original, MIT.

A diagnostic guide for investigating AWS cost increases and finding recurring cloud waste.

In plain words
What is it for?
Use it to investigate spending spikes, review AWS accounts, inspect Cost Explorer and billing data, find waste, and assess options such as Savings Plans or Reserved Instances.
Why use it?
It replaces guesses about the bill with measured comparisons and checks for common sources of waste, such as unused storage, network charges, and idle services.

Skill for Claude Code

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

Part of the cloud-platform-skills plugin — 7 skills shipped together

Good fit Use it to investigate spending spikes, review AWS accounts, inspect Cost Explorer and billing data, find waste, and assess options such as Savings Plans or Reserved Instances.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goodsmileduck/claude-registry/aws-cost-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 Goodsmileduck/claude-registry --skill aws-cost-investigation
Clone the repo
git clone --depth 1 https://github.com/Goodsmileduck/claude-registry

Made for: Claude Code.

Or install cloud-platform-skills, 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 aws-cost-investigation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/goodsmileduck/claude-registry/aws-cost-investigation"><img src="https://agentmods.dev/badge/skills/goodsmileduck/claude-registry/aws-cost-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,084 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.00135 $0.05084
Opus 5 $0.00068 $0.02542
Sonnet 5 $0.00027 $0.01017
Haiku 4.5 $0.00014 $0.00508

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

Security

Grade A, and why

aws-cost-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 11d 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/cloud-platform-skills/skills/aws-cost-investigation/SKILL.md · 464 lines

How it starts

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

AWS Cost Investigation

Operational skill for diagnosing AWS cost spikes and auditing for ongoing waste. The focus is on diagnostic flow (data-first, not guess-first) plus a concrete trap inventory with detection CLI for each.

When to invoke

Symptoms:

  • "The bill is up $X with no deploys" / "AWS bill spiked last month."
  • An anomaly notification from AWS Cost Anomaly Detection.
  • Cost Explorer dashboards show large (no tag) slices despite tagging policies.
  • NAT Gateway charges growing month over month.
  • Looking at a Savings Plan / Reserved Instance commitment decision.
  • A general account audit ("find the waste").
  • Designing a cost-allocation tagging strategy.

Cross-cutting rules

  1. Data first, guesses never. When asked to diagnose a spike, the first action is to query Cost Explorer. Do NOT guess "probably S3" or "probably NAT" without numbers. Naming a likely culprit without data is anti-pattern #1.
  2. Compare windows of equal length. A 7-day spike compares to the prior 7 days, not month-to-date. A monthly spike compares to the same days of the prior month, not the full prior month.
  3. Never quote a specific dollar amount as a pricing fact. AWS prices change. State relative magnitudes (Gateway endpoints are free; Interface endpoints are cheaper than NAT for high egress) and link to the AWS pricing page for current numbers when a precise answer is needed.
  4. Activation is the silent gate for tag-based analysis. A tag on a resource is invisible to Cost Explorer / CUR until it's activated as a Cost Allocation Tag. See Cost allocation tagging.
  5. Stop-the-bleeding before re-architecting. When a runaway cost is identified, the first action is to cap it (set retention, delete idle, add a budget alarm) — not redesign the workload.

Diagnostic flow for spikes

Run the steps in order. Don't skip ahead.

Step 1 — Service-level diff

# Compare two equal-length windows (here: last 7d vs prior 7d)
END=$(date -u +%Y-%m-%d)
START=$(date -u -d '-7 days' +%Y-%m-%d)
PRIOR_END=$START
PRIOR_START=$(date -u -d '-14 days' +%Y-%m-%d)

for window in "$PRIOR_START $PRIOR_END" "$START $END"; do
  read s e <<<"$window"
  aws ce get-cost-and-usage \
    --time-period Start=$s,End=$e \
    --granularity DAILY \
    --metrics UnblendedCost \
    --group-by Type=DIMENSION,Key=SERVICE \
    --query 'ResultsByTime[].Groups[]' \
    --output json > /tmp/ce-$s.json
done
# Diff per-service totals between the two files to find the top growers.

Read the full file on GitHub · 464 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 464 lines · 135 tokens per session scan A 47f49082d559

Subscribe to this mod's changes

aws-cost-investigation is a skill published in the GitHub repository Goodsmileduck/claude-registry (1 stars, last pushed 1mo ago), licensed MIT. It adds 135 tokens to every session and 5,084 once invoked, about $0.0007 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.