mcpbeat Sign in

Cost Tracker Skill for Claude

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

821 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2755
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/rohitg00/pro-workflow --skill cost-tracker

The instruction itself

11 sections, as written by the author

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

# 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

  • Scope prompts tightly — "Fix the auth bug in src/auth/login.ts" vs "Fix the auth bug"
  • Use the right model — Haiku for simple lookups, Sonnet for features, Opus for architecture
  • Delegate to subagents — Search/explore operations in subagents keep main context lean
  • Compact proactively — Don't wait for auto-compact; compact at task boundaries
  • Read selectively — Use offset and limit params for large files
  • Batch operations — Multiple independent tool calls in one message
  • One-pass discipline — Write complete solution, test once, stop if green
  • No re-reads — Don't re-read unchanged files; trust cached knowledge
  • Read before write — Never write a file without reading it first

10. Kill output bloat — No sycophantic openers, no closing fluff, no prompt restatement

Budget Alerts

Set mental checkpoints:

  • 50% budget — Are you on track? Should you compact?
  • 80% budget — Wrap up current task, avoid new exploration
  • 100% budget — Commit what you have, start fresh session

Output

COST TRACKER
  Session cost: $X.XX
  Token usage: [input]K in / [output]K out
  Cache hit rate: ~XX%

  Top cost drivers:
    1. [operation] — $X.XX
    2. [operation] — $X.XX

  Optimization tips:
    - [specific suggestion]

Rules

  • Track costs as awareness, not hard limits
  • Never sacrifice code quality to save tokens
  • Compact at task boundaries, not mid-task
  • Use subagents for exploration-heavy work

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ×10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
×9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
×7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
×5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ×4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ×4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
×4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take rohitg00/cost-tracker from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.