aws-scan-cost

aws-scan-cost is a skill for Claude Code, Codex from nirecom/agents. It costs 19 tokens per session (314 once invoked), scanned A, original, MIT.

A read-only AWS billing check that uses Cost Explorer, the AWS service for viewing usage costs, to find the main services driving current spending.

In plain words
What is it for?
Use it to review the top five AWS cost drivers and month-over-month trends. It saves raw billing data and a human-readable summary while omitting dollar amounts from the conversation.
Why use it?
It gives a repeatable view of which AWS services account for the most cost and whether their relative usage is rising or falling compared with the previous month.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/nirecom/agents/aws-scan-cost
Any agent
npx skills add nirecom/agents --skill aws-scan-cost
Clone the repo
git clone --depth 1 https://github.com/nirecom/agents

Made for: Claude Code, Codex.

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-scan-cost

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirecom/agents/aws-scan-cost.svg)](https://agentmods.dev/skills/nirecom/agents/aws-scan-cost)
Your own site
<a href="https://agentmods.dev/skills/nirecom/agents/aws-scan-cost"><img src="https://agentmods.dev/badge/skills/nirecom/agents/aws-scan-cost.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 314 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00019 $0.00314
Opus 5 $0.00010 $0.00157
Sonnet 5 $0.00004 $0.00063
Haiku 4.5 $0.00002 $0.00031

Measured 4d ago against content hash 38f1abde39be, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

aws-scan-cost 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 4d 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.

skills/aws-scan-cost/SKILL.md · 31 lines

What it actually says

Procedure

ASC-1. Verify prerequisites. Requires ce:GetCostAndUsage. ASC-2. Query (pass --profile $AWS_PROFILE; Cost Explorer ignores region):

  • Current month: aws ce get-cost-and-usage --time-period Start=<YYYY-MM-01>,End=<today> --granularity MONTHLY --metrics BlendedCost --group-by Type=DIMENSION,Key=SERVICE
  • Previous month: same with prior month range ASC-3. Identify top 5 cost drivers; calculate MoM delta. ASC-4. Write raw data to $AWS_STATE_DIR/cost-<YYYYMMDD>.json. ASC-5. Write human-readable summary to $AWS_STATE_DIR/cost-<YYYYMMDD>.md:
  • Top 5 services ranked by cost (no dollar amounts — relative % or rank only)
  • MoM trend per service (up/down/flat) ASC-6. Print: rank 1–5 only (no dollar amounts in conversation).

Rules

  • Read-only. Dollar amounts must NOT appear in conversation.
  • Skip gracefully if Cost Explorer disabled or access denied.
  • Time ranges in UTC YYYY-MM-DD.

Skip Conditions

Skip if $AWS_STATE_DIR/cost-<YYYYMMDD>.json exists and is less than 4 hours old.

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. 4d ago First seen · 31 lines · 19 tokens per session scan A 38f1abde39be

Subscribe to this mod's changes

aws-scan-cost is a skill published in the GitHub repository nirecom/agents (3 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 314 once invoked, about $0.0001 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.