Agent Cost Report
Turns Claude Code transcript tokens into labeled dollars and renders a manager-ready cost, waste and failure report as HTML, PDF, JSON and CSV.
Data & AnalyticsAdvanced★ 119,586⑂ 10,393AI score 9/10Last updated: Nov 25, 2026
What it does
- Reads Claude Code (and Codex) transcripts under
~/.claude/projects, dedupes assistant replies and prices exact token usage at OpenRouter public list rates. - Defaults to the last 7 full PT days excluding today; also supports
--session,--projectand explicit--start/--endwindows. - Groups sessions into named work items with a work category (Feature, Bug fix, Incident, Maintenance, Investigation, Experiment) and failure types (Looping, Rework, Wrong turn, and more).
- Computes cost per completed outcome, waste rate and cost of mistakes, then emits a self-contained
report.html,report.pdf,report.json,line-items.csvandevidence.json. - Every figure carries a label — Measured, Estimated, Extrapolated or Unavailable — and never shows a fake $0 for unknown spend.
Who it's for
- Engineering leads who must justify AI agent spend to management.
- Developers who want weekly visibility into where tokens are being burned.
- claude-mem / mem-search users who want to replay session history through a cost lens.
Example uses
- "What did the agents cost this week?" → runs prices → collect → rollup → render → pdf over the default 7-day PT window.
- "Cost for project X last week" →
--project <name> --start 2026-09-15 --end 2026-09-22, including the project's worktrees. - "Was this session worth it?" →
--session <id>, pull the cited observations, confirm or fix each label, then apply withreview --apply.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/thedotmack/claude-mem/HEAD/claude-mem-cursor/skills/agent-cost-report/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the claude-mem-cursor/skills/agent-cost-report folder from the GitHub repo thedotmack/claude-mem into my ~/.claude/skills/agent-cost-report/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/thedotmack/claude-mem.git && mkdir -p ~/.claude/skills && cp -r claude-mem/claude-mem-cursor/skills/agent-cost-report ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and move to a working folder.
- Clone the repository:
git clone https://github.com/thedotmack/claude-mem.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill in:
cp -r claude-mem/claude-mem-cursor/skills/agent-cost-report ~/.claude/skills/ - Check Python:
python3 --version(3.9+ required; no pip installs needed, excepttzdataon Windows if the script reports missing timezone data). - Restart Claude Code and ask for "an agent cost report for last week".
- Optional: install Chrome for PDF output, and export
OPENROUTER_API_KEYif you want measured provider spend instead of estimates.
View source on GitHub ↗License: Apache-2.0