Claude Code Cost Tracking
analytics
Claude Code Cost Tracking is a Claude Code skill that answers questions like how much have I spent, what did this session cost, and what is my token usage, by reading a local metrics log. The cost-tracker stop hook appends to ~/.claude/metrics/costs.jsonl: every session stop adds a cumulative snapshot with input and output tokens, cache tokens and a precomputed cost estimate in dollars. So the skill takes the latest row for each session instead of summing every row, and it uses the precomputed cost rather than recalculating from prices. It reports today versus yesterday, the total across sessions, a breakdown by model and the session count, and can drill into one session or export CSV. If the log is missing, it invents no figures and explains that it appears after the first session ends with the hook enabled. Node is used for the calculations.
- #cost-tracking
- #token-usage
- #claude-code
- #budget
- #metrics
- #jsonl
- #reporting