cost-reflect

cost-reflect is a skill for Claude Code, Codex from gtapps/claude-code-hermit. It costs 84 tokens per session (1,021 once invoked), scanned A, original, MIT.

A spending audit for Claude Code usage. It examines recent token costs, including input, output, cached reads, and cached writes, and links them to individual sessions.

In plain words
What is it for?
Use it to get a cost breakdown, find expensive sessions, investigate cold-start costs, or answer questions about recent spending.
Why use it?
It helps explain why a bill is high by showing where usage-related spending is coming from.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claude-code-hermit plugin — 28 skills, 4 agents shipped together

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/gtapps/claude-code-hermit/cost-reflect
Any agent
npx skills add gtapps/claude-code-hermit --skill cost-reflect
Clone the repo
git clone --depth 1 https://github.com/gtapps/claude-code-hermit

Made for: Claude Code, Codex.

Or install claude-code-hermit, the plugin that ships this one along with the rest of its 28 skills, 4 agents.

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-reflect

README.md
[![agentmods](https://agentmods.dev/badge/skills/gtapps/claude-code-hermit/cost-reflect.svg)](https://agentmods.dev/skills/gtapps/claude-code-hermit/cost-reflect)
Your own site
<a href="https://agentmods.dev/skills/gtapps/claude-code-hermit/cost-reflect"><img src="https://agentmods.dev/badge/skills/gtapps/claude-code-hermit/cost-reflect.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,021 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.00084 $0.01021
Opus 5 $0.00042 $0.00511
Sonnet 5 $0.00017 $0.00204
Haiku 4.5 $0.00008 $0.00102

Measured yesterday against content hash 770b33d0e202, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cost-reflect 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 yesterday.

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/claude-code-hermit/skills/cost-reflect/SKILL.md · 59 lines

How it starts

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

Cost Reflect

Runs a structural cost audit over the last 7 days of cost-log.jsonl and delivers the result to the operator. The math is done by a script — your job is to run it and deliver the output through the right channel.

Invocation mode

  • Manual (no arguments): reply only to the invoking terminal or channel conversation.
  • Automated (--maintainer, or any routine/proactive invocation): produce the full technical report and send it as a maintainer-tier notice.

Step 1 — Run the analyzer

On a channel-tagged turn without --maintainer (the inbound prompt contains a <channel source="..."> tag), run the plain-language mode instead of the full breakdown — a channel operator asking "why is my bill high" shouldn't get raw token-category jargon:

bun ${CLAUDE_PLUGIN_ROOT}/scripts/cost-report.ts reflect .claude-code-hermit --plain

Otherwise (terminal/dev use or --maintainer), run the full breakdown:

bun ${CLAUDE_PLUGIN_ROOT}/scripts/cost-report.ts reflect .claude-code-hermit

Capture stdout. If the output starts with "No cost data" or "No spend recorded yet", report that message and stop — there's nothing to send.

Step 2 — Relay the report

Terminal: the script output is already formatted and capped at 1500 characters. Relay it verbatim. Don't summarize, reformat, or add commentary — the output is the report.

Channel (--plain output): reply through that channel's reply tool. The script output is already plain language and jargon-free — no cache_read/cache_write/token-type labels, no session IDs, no PROP-/S-NNN, no slash commands. Relay it translated into the operator's language if the inbound message wasn't in English. Translation only — add no commentary and don't reintroduce token-category detail.

Step 3 — Channel delivery

When $ARGUMENTS contains --maintainer (or the invocation is a routine/proactive prompt rather than a direct operator conversation), deliver the report through the operator's channel. Spend detail is maintainer-tier by definition, so send it as the maintainer leg only (no client leg):

Read the full file on GitHub · 59 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. yesterday Changed · -8 lines 770b33d0e202
  2. 5d ago First seen · 67 lines · 84 tokens per session scan A 5a02228530b5

Subscribe to this mod's changes

cost-reflect is a skill published in the GitHub repository gtapps/claude-code-hermit (73 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 1,021 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

google-ads-audit

Google Ads account audit and business context setup. Run this first — it gathers business information, analyzes account health, and saves context that all other ads skills reuse. Trigger on "audit my ads", "ads audit", "set up my ads", "onboard", "account overview", "how's my account", "ads health check", "what should…

nowork-studio/notfair-plugin · 114 tokens

review

5-pass structured code review — correctness, security, performance, readability, consistency.

SethGammon/Citadel · 17 tokens

alive:system-upgrade

Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.

alivecontext/alive · 57 tokens

codex-test-gen

Generate unit tests for specified functions using Codex MCP.

sd0xdev/sd0x-harness · 15 tokens

ensure-pipelines-host

Ensures the tenant has a usable Power Platform Pipelines host environment before any pipeline operation runs. Detects host state via the same resolution order as the Power Apps UI (org-db setting → BAP env metadata → default-custom-host setting); if any existing host (Platform or Custom) is found, uses it. If no host…

microsoft/power-platform-skills · 222 tokens