
Agent Cost Report
Estimate what Claude Code agent sessions cost per period and per outcome, as an HTML/PDF report
- Repository
- thedotmack/claude-mem
- Stars
- 110,174
- Licence
- Apache-2.0
- Files
- 15 files
What it does
When installed, the agent can produce a manager-style cost report of Claude Code and Claude-Mem activity for a chosen period (by default the last 7full Pacific days). It reads local Claude Code transcript files, counts tokens per reply, estimates dollar cost using OpenRouter public list prices, and groups work into outcomes with cost and waste labels. It outputs an HTML or PDF report plus JSON, CSV and evidence files. Dollar figures are labelled as estimates, not provider bills.
Great for
- Engineering leads who want a rough cost-per-outcome view of AI agent usage
- Developers using Claude Code with Claude-Mem who want to see where tokens were wasted
- Teams preparing a printable weekly summary of agent work
Skip it if
- Exact billing or invoice reconciliation: dollars are estimates from list prices, not measured provider spend (the report labels them ESTIMATED).
- Environments where transcripts contain sensitive content you do not want processed or exported to reports, since the skill reads conversation history.
- Users without Python 3.9+ or without access to the Claude-Mem memory search tools, since the review step depends on them.
Try asking
- “Give me the agent cost report for the last 7 full days”
- “Make a cost report for project billing-api from 2026-09-01 to 2026-09-15”
- “Cost per outcome for session abc123, as HTML and PDF”
- “Was this session worth it? Show the failure economics”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 15 original files, the Apache-2.0 licence and an attribution note.
agent-cost-report.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip agent-cost-report.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip agent-cost-report.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Let the default window run; it excludes today so the report never contains a partial day.
- Review the draft labels the pipeline assigns and confirm them, since keyword-based drafts can be wrong.
- Treat the dollar totals as estimates and check the evidence.json file before sharing the report externally.
What's inside
- CHECKSUMS.txt
- scripts/acr.py
- scripts/acr/__init__.py
- scripts/acr/behavior.py
- scripts/acr/classify.py
- scripts/acr/costs.py
- scripts/acr/devices.py
- scripts/acr/evidence.py
- scripts/acr/labels.py
- scripts/acr/measure.py
- scripts/acr/mistakes.py
- scripts/acr/patterns.py
- scripts/acr/period.py
- scripts/acr/prices.py
- SKILL.md
Redistributed unmodified from thedotmack/claude-mem under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.