Claude Agent Ledger — Development skill for Claude Code
Per-subagent cost attribution for Claude Code.
How to install Claude Agent Ledger
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open XJM-free/agent-ledger and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Agent Ledger does
Per-subagent cost attribution for Claude Code. Reads local JSONL session logs, computes shadow cost at marginal Anthropic API rates with proper TTL pricing.
Alternatives in Development
- Third-party Notices — THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI 94.7k ★
- Om Dump — Freeform capture mode 4.6k ★
- Memory Gc — Inspect or rotate the autopilot ledger JSONL files (findings.jsonl, negatives.jsonl) 3.8k ★
README
claude-agent-ledger
See exactly where your Claude Code budget goes — per subagent, per model, per day.
[](https://www.npmjs.com/package/claude-agent-ledger) [](LICENSE)
Use `--anonymize` before sharing output. It replaces project paths and session IDs, but it does not rename subagent or tool names — review those before you post a screenshot.
Why
Claude Code's invoice at month-end tells you one number. It doesn't tell you:
- Which of your subagents burned most of it
- Which model (Opus / Sonnet / Haiku) ate the budget
- Which day of last week was the expensive one
- Whether your "cheap" Haiku agent is actually quietly expensive
If you run **one** Claude Code session, this is fine — you already know. If you run **seven** subagents daily (reliability, release, review, iOS factory, docs, ...), you're flying blind.
`claude-agent-ledger` reads Claude Code's local session logs and gives you a per-subagent ledger. That's it.
Install
Requires [Bun](https://bun.sh/) 1.1 or newer. The CLI is Bun-native even when you install it from npm.
bun install -g claude-agent-ledger
# or, with Bun already available: npm install -g claude-agent-ledger
agent-ledger week --summary # the dashboard (start here)
agent-ledger week --tree # parent → child subagent attribution
agent-ledger week --by tool # which tool ate the budget (Read/Bash/Grep/MCP)
agent-ledger week --by model # opus vs sonnet vs haiku
agent-ledger week --by project # which project ate your tokens
agent-ledger week --by session # which single sessions went sideways
agent-ledger week --by day # daily bar chart with peak/avg/variance
agent-ledger today --budget 50 # CI gate: exit 2 if today > $50
agent-ledger week --json | jq # JSON output for any view, including summary
agent-ledger month --md > report.md
# Live tail
Related Skills
Agenthropic
Self-hosted, local-first dashboard for observing Claude Code agent and subagent activity — a persisted subagen
Claude Code Shadow Bill
Price your Claude Code transcripts at API list rates: request leaderboard, per-session costs, and the 60-minut
Cc Waste
Scans your local Claude Code session logs and generates a self-contained HTML report of token usage, cost, and
Router Stats
Show skill-router match statistics from ~/.claude/logs/intent-router-.jsonl and prune logs older than 30 days.
Analyze Patterns
Analyze ~/.claude/tool_logs/operations.jsonl operation logs to identify repeated patterns across sessions and
Analyze Patterns.Zh CN
分析 ~/.claude/tool_logs/operations.jsonl 操作日志,识别跨会话的重复模式,并自动生成可复用的 Skills。
Related Agents
Financial Controller
Financial Controller for agent teams. Audits token usage, run duration, tool calls and efficiency across all d
Ga4 Funnel
GA4 funnel analyst. Builds an N-step funnel from any user-supplied event list, computes step conversion and dr
Outreach Analyst
Campaign analyst. Reads one campaign's statistics and activity feed from Emelia, computes the rates on stated