cost-tracking
Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.
Install
git clone https://github.com/affaan-m/ECC /tmp/ECC && ln -s /tmp/ECC/skills/cost-tracking ~/.claude/skills/cost-tracking
From README
Cost Tracking Use this skill to analyze Claude Code cost and history from the metrics log that ECC's stop:cost-tracker hook writes. Where the data lives The tracker appends one JSON object per session-stop to /.claude/metrics/costs.jsonl. Each row is a cumulative snapshot for that session, so to total spend you take the latest row per sessionid and sum across sessions — summing every row multiply-counts. Row schema: | Field | Meaning | | --- | --- | | timestamp | ISO timestamp of the snapshot | | sessionid | Claude Code session identifier | | transcriptpath | Path to the session transcript | | model | Model used | | inputtokens / outputtokens | Token counts | | cachewritetokens / cachereadtokens | Prompt-cache token counts | | estimatedcostusd | Precomputed cumulative cost in USD for the session | Prefer estimatedcostusd over hand-calculating pricing — model and cache prices change, and the tracker is the source of truth.
More from this repo
api-design
REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning,...
article-writing
Used to write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive...
brand-voice
Used to build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then...
