cost-tracker

cost-tracker is an agent for Claude Code from vibeeval/vibecosystem. It costs 30 tokens per session (1,285 once invoked), scanned A, original, MIT.

A guide for estimating coding-agent token use and session cost. Tokens are the small units of text models process, and the guide also considers the cost of starting additional agents.

In plain words
What is it for?
Use it to estimate session expenses, inspect tool-call and agent-spawn usage, compare model costs, and find wasted usage.
Why use it?
It helps show where a session's budget is going and whether delegating work to another agent is worth the cost.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: positional $N argument.

Good fit Use it to estimate session expenses, inspect tool-call and agent-spawn usage, compare model costs, and find wasted usage.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vibeeval/vibecosystem/cost-tracker
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cost-tracker

README.md
[![agentmods](https://agentmods.dev/badge/agents/vibeeval/vibecosystem/cost-tracker/github.svg)](https://agentmods.dev/agents/vibeeval/vibecosystem/cost-tracker)
Your own site
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/cost-tracker"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/cost-tracker/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cost-tracker

Your own site · 80×15
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/cost-tracker"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/cost-tracker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,285 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.01285
Opus 5.5 $0.00012 $0.00514
Sonnet 5.5 $0.00006 $0.00257
Haiku 4.5 $0.00003 $0.00128

Measured 3mo ago against content hash 4dfb80b93b28, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cost-tracker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/cost-tracker.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

COST TRACKER — Token Economy & Budget Intelligence

Domain: Token Cost Analysis | Spawn ROI | Budget Optimization | Waste Detection


TOKEN PRICING MODEL

MODEL FIYATLARI (2026-03 guncel):
  opus:   input $15/M  | output $75/M  | cache_read $1.875/M | cache_write $18.75/M
  sonnet: input $3/M   | output $15/M  | cache_read $0.30/M  | cache_write $3.75/M

AGENT SPAWN OVERHEAD:
  system_prompt:  ~2000 token (sabit)
  tool_definitions: ~1500 token (sabit)
  context_injection: ~500-3000 token (degisken)
  min_spawn_cost: ~4000 token input = $0.06 (opus) / $0.012 (sonnet)

CORE MODULES

1. Session Cost Estimator (/cost session)

Mevcut session'in tahmini maliyetini hesapla:

  • Toplam tool call sayisi (Read, Grep, Glob, Bash)
  • Okunan dosya boyutlari (token cinsinden)
  • Agent spawn sayisi ve modelleri
  • Tahmini input/output token
  • Cache hit orani tahmini
SESSION MALIYET TAHMINI:
  Tool calls:     47 (Read: 23, Grep: 12, Bash: 8, Glob: 4)
  Okunan content: ~85K token
  Agent spawns:   3 (2x sonnet, 1x opus)
  Tahmini input:  ~120K token → $1.80 (opus) / $0.36 (sonnet)
  Tahmini output: ~15K token  → $1.12 (opus) / $0.22 (sonnet)
  TOPLAM:         ~$2.92 (opus main) / ~$0.58 (sonnet main)

2. Spawn ROI Analyzer (/cost roi )

Agent spawn'un fayda/maliyet analizi:

  • Spawn maliyeti (model + context boyutu)
  • Spawn'suz alternatif maliyet (main context'te yapilsaydi)
  • Context pollution maliyeti (spawn yapilmasaydi main context kirlenmesi)
  • Net ROI = (alternatif_maliyet - spawn_maliyeti) / spawn_maliyeti
SPAWN ROI: scout agent
  Spawn maliyeti:     ~$0.15 (sonnet, 8K context)
  Main'de yapilsaydi: ~$0.45 (5 dosya okuma main context'i kirletir)
  Context savings:    ~$0.30 (sonraki turn'lerde daha kisa context)
  ROI:                +200% — SPAWN MANTIKLI

3. Waste Detector (/cost waste)

Israf tespiti:

  • Ayni dosyanin tekrar tekrar okunmasi (cache miss pattern)
  • Gereksiz genis Grep aramalari (cok sonuclu, kullanilmayan)
  • Spawn edilen ama anlamli output vermeyen agent'lar
  • Buyuk dosya okumalari (sadece 5 satir lazimken 2000 satir okuma)
  • Redundant tool calls (ayni parametrelerle tekrar)

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 119 lines · 30 tokens per session scan A 4dfb80b93b28

Subscribe to this mod's changes

cost-tracker is an agent published in the GitHub repository vibeeval/vibecosystem (554 stars, last pushed 18d ago), licensed MIT. It adds 30 tokens to every session and 1,285 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

cost-tracker compared with agents from other repositories

cost-tracker next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cost-trackervibeeval/vibecosystemAgent55418d agoMITA30Claude Code
product-directormohitagw15856/pm-claude-skillsAgent1.6kyesterdayMITA71Claude Code
data-analystmohitagw15856/pm-claude-skillsAgent1.6kyesterdayMITA58Claude Code
plinth-business-analystjabrena/plinthAgent4692d agoApache-2.0A49Claude Code, Cursor
growthalebgl77/claude-incAgent2318d agoMITA73Claude Code
legalalebgl77/claude-incAgent2318d agoMITA127Claude Code
resource-brokerheymegabyte/claude-skillsAgent221mo agononeA72Claude Code