# Cost Tracker

Track session costs, set budget alerts, and optimize token spend.

- Repository: https://github.com/rohitg00/pro-workflow (2940 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-09-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rohitg00/pro-workflow --skill cost-tracker -g -a claude-code -y`
Codex: `npx skills add rohitg00/pro-workflow --skill cost-tracker -g -a codex -y`
Cursor: `npx skills add rohitg00/pro-workflow --skill cost-tracker -g -a cursor -y`
Gemini CLI: `npx skills add rohitg00/pro-workflow --skill cost-tracker -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add rohitg00/pro-workflow`

## Description

Track session costs, set budget alerts, and optimize token spend. Use to check costs mid-session or set spending limits.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Cost Tracker

Monitor and optimize Claude Code session costs.

## Trigger

Use when:
- Checking session costs
- Setting budget alerts
- Optimizing token spend
- Planning multi-session work

## Cost Awareness

### Check Current Costs
```bash
# Session cost is shown at the end of each session
# Mid-session: check the status bar or run /cost
```

### Cost Drivers

| Operation | Relative Cost | Optimization |
|-----------|--------------|-------------|
| Large file reads | High | Use offset/limit params |
| Broad grep searches | Medium | Scope to specific dirs |
| Subagent spawning | High (new context) | Reuse agents via SendMessage |
| Repeated tool calls | Cumulative | Batch operations |
| MCP tool calls | Variable | Minimize round-trips |
| Model selection | 3-10x difference | Use haiku for simple tasks |

### Token Budget by Task Type

| Task | Typical Cost | Budget Alert |
|------|-------------|-------------|
| Bug fix | $0.10-0.50 | $1.00 |
| Feature (small) | $0.50-2.00 | $3.00 |
| Feature (large) | $2.00-8.00 | $10.00 |
| Refactor | $1.00-5.00 | $7.00 |
| Code review | $0.20-1.00 | $2.00 |

### Tool-Call Budgets

Set explicit budgets by task complexity:

| Task Type | Tool-Call Budget | Wrap-Up At |
|-----------|-----------------|------------|
| Quick fix / lookup | 20 calls | 15 |
| Bug fix | 30 calls | 25 |
| Feature (small) | 50 calls | 40 |
| Feature (large) | 80 calls | 65 |
| Refactor | 50 calls | 40 |

At the wrap-up threshold: commit progress, assess remaining work, decide whether to continue or start fresh.

### Optimization Strategies

The rest: https://github.com/rohitg00/pro-workflow/blob/HEAD/skills/cost-tracker/SKILL.md
