cost-tracker — скилл для Claude Code: расходы и установка
Скилл cost-tracker помогает следить за стоимостью сессии Claude Code, задавать бюджетные ориентиры и находить источники лишних расходов. Пригодится при работе над задачами в нескольких сессиях.
MIT ★ 2 966 обновлён 2026-09-29
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflowЧто делает cost-tracker
cost-tracker показывает, где расходуются токены и деньги: среди причин названы большие чтения файлов, широкие поиски, повторные вызовы инструментов и выбор модели. Для оценки текущей стоимости скилл предлагает смотреть на строку состояния или использовать /cost; итог сессии отображается при её завершении. Это рекомендации по контролю расходов, а не жёсткие лимиты.
Для разных задач приведены ориентиры бюджета и числа вызовов инструментов, а контрольные точки на 50%, 80% и 100% бюджета помогают решить, стоит ли завершить текущую работу или начать новую сессию. Скилл также советует сужать запросы, читать крупные файлы частями и группировать независимые вызовы. Haiku предлагается для простых задач, Sonnet — для функций, Opus — для архитектуры. Качество кода при экономии токенов снижать не следует.
Какие задачи решает
- проверить стоимость текущей сессии
- оценить бюджет для исправления бага или новой функции
- найти операции, которые увеличивают расход токенов
- решить, когда завершить работу и начать новую сессию
Примеры запросов агенту
- Оцени расходы текущей сессии и назови главные источники затрат.
- Помоги задать бюджет вызовов инструментов для большой функции.
- Подскажи, как сократить расход токенов при поиске по проекту.
Как установить cost-tracker
1Через маркетплейс плагинов
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflowКоманда ставит плагин pro-workflow целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill cost-tracker -a claude-code3Вручную: положить файлы
~/.claude/skills/cost-tracker/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cost-tracker/
1Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill cost-tracker -a codex2Вручную: положить файлы
.agents/skills/cost-tracker/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill cost-tracker -a cursor2Вручную: положить файлы
.cursor/skills/cost-tracker/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install rohitg00/pro-workflow skills/cost-tracker2Вручную: положить файлы
.github/skills/cost-tracker/SKILL.md1Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill cost-tracker -a gemini-cli2Командой платформы
gemini skills install https://github.com/rohitg00/pro-workflow --path skills/cost-trackerВручную: положить файлы
.devin/skills/cost-tracker/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о cost-tracker
Как установить cost-tracker в Claude Code?
В Claude Code сначала добавьте маркетплейс командой /plugin marketplace add rohitg00/pro-workflow, затем установите плагин командой /plugin install pro-workflow@pro-workflow.
Что делает cost-tracker?
Он помогает оценивать стоимость сессии Claude Code, разбирать источники расходов и планировать бюджет токенов и вызовов инструментов. Его рекомендации не задают жёстких лимитов.
Как проверить расходы до завершения сессии?
Посмотрите на строку состояния или выполните /cost. Итоговая стоимость также отображается в конце сессии.
Исходный текст
SKILL.md · MIT
---
name: cost-tracker
description: Track session costs, set budget alerts, and optimize token spend. Use to check costs mid-session or set spending limits.
user-invocable: true
---
# 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
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 boundaries
5. **Read selectively** — Use `offset` and `limit` params for large files
6. **Batch operations** — Multiple independent tool calls in one message
7. **One-pass discipline** — Write complete solution, test once, stop if green
8. **No re-reads** — Don't re-read unchanged files; trust cached knowledge
9. **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
```text
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
© Rohit Ghumare · MIT · rohitg00/pro-workflow