cost-tracking

Analyze Claude Code cost and usage history from a local SQLite database.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill cost-tracking-sakamoto-family-smile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-tracking
Source: https://github.com/sakamoto-family-smile/agent_monorepo/tree/main/.claude/skills/ecc/cost-tracking
Command: npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill cost-tracking-sakamoto-family-smile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Claude Code cost and usage can drift between sessions and projects; this skill tracks and reports usage, spend, and budgets from a local database to enable cost awareness and governance.

Core Features & Use Cases

  • Read and summarize usage and costs from the local database by date, project, tool, session, or model.
  • Export CSV reports to share with stakeholders and support budgeting.
  • Detect spending trends and guardrails with quick, repeatable analytics for cost control.

Quick Start

Query the local ~/.claude-cost-tracker/usage.db to generate today's total spend and per-project costs.

Frequently Asked Questions about cost-tracking

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

FAQPage Schema
How do I track Claude Code usage and spend locally?

To track Claude Code usage locally, query a SQLite database at ~/.claude-cost-tracker/usage.db to analyze spend data. The database stores standardized usage records including timestamps, project names, token counts, and cost amounts.

Can I break down Claude Code costs by project, model, or session?

Yes, you can break down Claude Code costs by project, tool, session, model, or date. The skill analyzes the local SQLite database to summarize costs across these dimensions for cost auditing and budgeting.

What is the best way to export Claude Code cost reports for budgeting?

The best way to export Claude Code cost reports is to generate CSV reports directly from the local SQLite usage database. These CSV files can be shared with stakeholders to support budgeting and cost control efforts.

Do I need a SQLite database set up before tracking Claude Code costs?

Yes, you need a local SQLite database at ~/.claude-cost-tracker/usage.db before tracking costs. The skill reads standardized usage schema with columns like timestamp, input_tokens, output_tokens, cost_usd, and model.

How does local cost tracking help with development environment governance?

Local cost tracking helps development environment governance by detecting spending trends and applying guardrails through repeatable analytics. It enables cost awareness by monitoring usage drift between sessions and projects from the local database.