Agent Cost Report

Reconstruct units of work from transcripts, assign costs and failure categories, render a manager-readable report.

115k|10.0k|Updated Aug 31, 2025
Ready to run
npx skills add https://github.com/thedotmack/claude-mem --skill agent-cost-report-thedotmack
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: Agent Cost Report
Source: https://github.com/thedotmack/claude-mem/tree/main/openclaw/skills/agent-cost-report
Command: npx skills add https://github.com/thedotmack/claude-mem --skill agent-cost-report-thedotmack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Claude-Mem activity is scattered across session transcripts and observations. Managers need to know what work was completed, what each outcome cost, what was wasted through looping or rework, and whether any unauthorized actions occurred. This Skill turns raw transcript data into a believable cost and failure report. ## Core Features & Use Cases - Cost Calculation: Measured tokens from Claude Code transcripts priced at OpenRouter list prices (estimated), with measured provider spend when available. - Failure Analysis: Detects looping, hedging, wrong turns, rework, and other waste patterns; prices them separately. - Multi-Format Output: Generates Timing-style HTML, optional PDF, report.json, line-items.csv, and evidence.json in one run. - Progressive Review: Uses Mem Search to confirm drafted labels before final report. - Use Case: After a week of intensive agent work, leadership needs to know: we spent $847 on this project, 12% was wasted through looping, three features shipped, and here's the cost per completed outcome. ## Quick Start Run the agent-cost-report skill to generate a cost report for the last 7 full days in Pacific Time, including token measurements from Claude Code transcripts, OpenRouter pricing, line items per work session, and an HTML report with wins, mistakes, and cost breakdown.

Frequently Asked Questions about Agent Cost Report

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate agent cost from Claude Code transcripts?▼

The skill reads transcript files from ~/.claude/projects, extracts measured input/output token counts per reply, and multiplies by OpenRouter list prices per million tokens. Cache tokens are priced separately at their listed rates.

What does the cost report include besides agent spending?▼

Beyond headline agent cost, the report shows wasted cost from looping and rework, observer (note-taker) tokens separately, cost per completed outcome, wins shipped, and risk exposure for unauthorized actions.

Can I use the report to track spending across multiple projects?▼

Yes. Run with --project <name> and --start/--end dates to scope the report to a specific project and time window, or use --session for a single session. All line items include project context.

What happens if I don't have measured OpenRouter spend?▼

The report shows estimated spend based on transcript tokens and list prices. The cost_basis field marks each line item as estimated, extrapolated, or measured so managers know confidence.

Why does the report show a separate observer note-taker cost?▼

Note-taker tokens and cost are never included in the agent headline or cost-per-outcome calculation. They appear in Details only and use their own input pricing rate.

How are failure types like Rework different from work categories?▼

Work category (Feature, Bug fix, etc.) describes the intended job. Failure_type (Rework, Looping, etc.) marks what went wrong. A line item can have both: Category = Bug fix, Failure_type = Rework.