cost-tracker

Solid

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

Data & Documents 183 stars 39 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
75
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 | ### Optimization Strategies 1. **Scope prompts tightly** — "Fix the auth bug in src/auth/login.ts" vs "Fix the auth bug" 2. **Use the right model** — Haiku for simple lookups, Sonnet for features, Opus for architecture 3. **Delegate to subagents** — Search/explore operations in subagents keep main context lean 4. **Compact proactively** — Don't wait for auto-compact; compact at task ...

Details

Author
majiayu000
Repository
majiayu000/claude-skill-registry
Created
5 months ago
Last Updated
1 months ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category