AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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, --project and explicit --start/--end windows.
  • 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.csv and evidence.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

  1. "What did the agents cost this week?" → runs prices → collect → rollup → render → pdf over the default 7-day PT window.
  2. "Cost for project X last week" → --project <name> --start 2026-09-15 --end 2026-09-22, including the project's worktrees.
  3. "Was this session worth it?" → --session <id>, pull the cited observations, confirm or fix each label, then apply with review --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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download 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.

  1. Open a terminal and move to a working folder.
  2. Clone the repository: git clone https://github.com/thedotmack/claude-mem.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill in: cp -r claude-mem/claude-mem-cursor/skills/agent-cost-report ~/.claude/skills/
  5. Check Python: python3 --version (3.9+ required; no pip installs needed, except tzdata on Windows if the script reports missing timezone data).
  6. Restart Claude Code and ask for "an agent cost report for last week".
  7. Optional: install Chrome for PDF output, and export OPENROUTER_API_KEY if you want measured provider spend instead of estimates.
View source on GitHub ↗License: Apache-2.0