cost-tracker

Tracks Claude Code session costs and enforces token and tool-call budgets.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill cost-tracker-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-tracker
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/cost-tracker
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill cost-tracker-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long AI coding sessions can silently accumulate high token costs, and without visibility into spending drivers, users overspend on large file reads, broad searches, and unnecessary subagent spawns. ## Core Features & Use Cases - Cost Awareness: Identifies the main cost drivers such as large file reads, broad grep searches, subagent spawning, and model selection, with concrete optimization tactics for each. - Budget Planning: Provides token and tool-call budget tables by task type (bug fix, small feature, large feature, refactor, code review) with wrap-up thresholds. - Optimization Strategies: Offers ten concrete rules including scoped prompts, right-sized model selection, proactive compaction, and batched tool calls. - Use Case: Midway through a large refactoring session, check current spend against the refactor budget, compact context at the task boundary, and decide whether to continue or start a fresh session. ## Quick Start Ask the assistant to check current session costs and suggest optimizations based on the cost-tracker budgets.

Frequently Asked Questions about cost-tracker

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

FAQPage Schema
How do I check Claude Code session costs mid-session?

Session cost is shown at the end of each session, and mid-session you can check the status bar or run the /cost command. The cost-tracker skill helps interpret that number against task-type budgets.

How to reduce token spend in AI coding sessions?

Reduce token spend by scoping prompts tightly, using offset and limit params on large file reads, batching independent tool calls, delegating exploration to subagents, and choosing cheaper models like Haiku for simple lookups.

What are the biggest cost drivers in Claude Code?

The largest cost drivers are large file reads, subagent spawning which creates new context, and model selection which can vary cost by 3-10x. Broad grep searches and repeated tool calls add cumulative medium costs.

How many tool calls should a typical bug fix use?

A typical bug fix has a tool-call budget of about 30 calls, with a wrap-up threshold at 25. Quick fixes target 20 calls, while large features may budget up to 80 calls before wrapping up.

When should I compact context to save costs?

Compact proactively at task boundaries rather than waiting for auto-compact or compacting mid-task. At 50 percent of budget, assess whether compaction is needed; at 80 percent, wrap up and avoid new exploration.