Agent Cost Report
Skill by thedotmack
Estimates agent cost per completed outcome from Claude Code transcripts for a chosen period, default the last 7 full Pacific days. Produces a printable HTML or PDF report plus JSON, CSV and evidence files for managers.
Install Agent Cost Report
Built from the published package, never by AI.
git clone --depth 1 https://github.com/thedotmack/claude-mem /tmp/claude-mem && mkdir -p ~/.claude/skills && cp -r /tmp/claude-mem/plugin/skills/agent-cost-report ~/.claude/skills/agent-cost-reportRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/thedotmack/claude-mem /tmp/claude-mem && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-mem/plugin/skills/agent-cost-report ~/.gemini/antigravity-cli/skills/agent-cost-reportAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Agent Cost Report turns Claude-Mem activity into a manager-readable cost and failure report. It totals measured tokens from Claude Code transcripts and prices them at OpenRouter public list prices, so the dollar figures are labeled ESTIMATED. Measured provider spend appears only when a sanctioned source provides it. The default window is the last 7 full days in Pacific Time, not counting today.
The skill runs a Python 3.9+ standard library pipeline in its scripts folder. A Mem Search review pass confirms the work categories and failure types drafted by keyword matching. The output is a Timing-style HTML or PDF report, plus report.json, line-items.csv and evidence.json. It is meant for managers who want cost per completed outcome and a view of wasted agent effort.
Written from the project's SKILL.md and checked against it.
What it can do
- Estimate token costTotals measured tokens from Claude Code transcripts and prices them at OpenRouter list prices.
- Default weekly windowCovers the last 7 full Pacific days, not counting today, unless a session, range or project is named.
- Mem Search reviewSearches Claude-Mem and confirms work categories and failure types from cited evidence IDs.
- Failure and waste trackingTags looping, hedging, wrong turns, rework and similar waste, with cost attached per line item.
- Behavior metricsCounts user turns and pattern hits as heuristics until they are reviewed.
- Report outputsWrites a Timing-style HTML or PDF report with report.json, line-items.csv and evidence.json.
What you need
- Python 3.9 or newer
- Claude Code transcripts in ~/.claude/projects
- Claude-Mem with Mem Search tools
- IANA timezone data for America/Los_Angeles (tzdata on stock Windows Python)
- OPENROUTER_API_KEY, only for the optional classifier
Try asking
- Run an agent cost report for the last 7 full days
- Make a cost report for session <content_session_id>
- Show cost per completed outcome for my project last week
Good to know
- Dollar figures are estimates from list prices, not provider invoices.
- Measured spend appears only when a sanctioned source provides it.
- Behavior counts are heuristics until reviewed.
- Models missing from the price list add no dollars.
Security check
B- Allowed to use Bash, Write without limitsIn
SKILL.md
Checked automatically: plugin/skills/agent-cost-report/SKILL.md, plugin/skills/agent-cost-report/scripts/acr.py, plugin/skills/agent-cost-report/scripts/acr/__init__.py, plugin/skills/agent-cost-report/scripts/acr/behavior.py, plugin/skills/agent-cost-report/scripts/acr/classify.py, plugin/skills/agent-cost-report/scripts/acr/costs.py, plugin/skills/agent-cost-report/scripts/acr/devices.py, plugin/skills/agent-cost-report/scripts/acr/evidence.py, plugin/skills/agent-cost-report/scripts/acr/labels.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: BashReadWriteAskUserQuestionmcp__plugin_claude-mem_mcp-search__searchmcp__plugin_claude-mem_mcp-search__timelinemcp__plugin_claude-mem_mcp-search__get_observations
-
.gitignore100 B -
CHECKSUMS.txt2 KB -
SKILL.md21 KB -
VERIFICATION.md12 KB -
scripts/acr.py12 KB
Show all 54 files
-
scripts/acr/__init__.py105 B -
scripts/acr/behavior.py17 KB -
scripts/acr/classify.py5 KB -
scripts/acr/costs.py6 KB -
scripts/acr/devices.py5 KB -
scripts/acr/evidence.py10 KB -
scripts/acr/labels.py8 KB -
scripts/acr/measure.py6 KB -
scripts/acr/mistakes.py23 KB -
scripts/acr/owner.py3 KB -
scripts/acr/patterns.py26 KB -
scripts/acr/period.py4 KB -
scripts/acr/prices.py5 KB -
scripts/acr/render.py53 KB -
scripts/acr/rollup.py32 KB -
scripts/acr/rules.json4 KB -
scripts/acr/rules.py4 KB -
scripts/acr/sample.py4 KB -
scripts/acr/snapshot.py2 KB -
scripts/acr/sync.py4 KB -
scripts/acr/transcripts.py9 KB -
scripts/acr/wins.py21 KB -
scripts/tests/_db.py4 KB -
scripts/tests/_paths.py337 B -
scripts/tests/fixtures/codex/sessions/2026/09/18/rollout-codex-1.jsonl664 B
And 24 more files on GitHub.
Alternatives to Agent Cost Report
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
Agent Cost Report: common questions
Does this show real spending?
Dollar figures are ESTIMATED from transcript tokens at OpenRouter list prices. Measured provider spend appears only when a sanctioned source provides it.
Which period does it cover by default?
The last 7 full days in Pacific Time, not counting today. You can name explicit start and end dates, or a single session or project.
Where do the token counts come from?
They come from Claude Code transcripts under ~/.claude/projects. Codex transcripts are read the same way, according to the source.
How do I install Agent Cost Report?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is Agent Cost Report free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is Agent Cost Report safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use bash, write without limits). Review the code before you install. How grades work.
What are alternatives to Agent Cost Report?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
