cost-tracking

cost-tracking is a skill for Claude Code, Codex from luanpdd/kit-mcp. It costs 52 tokens per session (3,788 once invoked), scanned A, original, MIT.

A cost tracker for measuring Claude Code spending in US dollars and token usage across sessions, phases, and five-hour blocks.

In plain words
What is it for?
Use it to check daily or session costs, estimate prompt spending, inspect token use, and review billing.
Why use it?
It answers how much an AI coding session or task actually cost, instead of confusing spending with an engineering error budget.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Claude Code; mentions Codex.

Good fit Use it to check daily or session costs, estimate prompt spending, inspect token use, and review billing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luanpdd/kit-mcp/cost-tracking
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.

Any agent
npx skills add luanpdd/kit-mcp --skill cost-tracking
Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

Made for: Claude Code, Codex.

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-tracking

README.md
[![agentmods](https://agentmods.dev/badge/skills/luanpdd/kit-mcp/cost-tracking.svg)](https://agentmods.dev/skills/luanpdd/kit-mcp/cost-tracking)
Your own site
<a href="https://agentmods.dev/skills/luanpdd/kit-mcp/cost-tracking"><img src="https://agentmods.dev/badge/skills/luanpdd/kit-mcp/cost-tracking.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,788 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.00052 $0.03788
Opus 5 $0.00026 $0.01894
Sonnet 5 $0.00010 $0.00758
Haiku 4.5 $0.00005 $0.00379

Measured 4d ago against content hash 71ca8046e9f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cost-tracking 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 4d 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.

kit/skills/cost-tracking/SKILL.md · 282 lines

How it starts

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

kit-mcp — Cost Tracking (Claude Code USD + tokens)

Quando usar

LLM carrega esta skill quando o user pergunta sobre dinheiro/tokens gastos com Claude Code. Trigger phrases:

  • "custo", "cost", "USD", "dólares", "gasto", "gastei", "spent"
  • "tokens", "token usage", "consumo de tokens"
  • "pricing", "billing", "fatura"
  • "budget" (no sentido financeiro, NÃO error budget)
  • "ROI", "retorno", "vale a pena essa fase"
  • "ccusage", "rastrear custo Claude"
  • "quanto a sessão custou", "custo do dia", "custo da fase"
  • "estimar custo de prompt", "estimate cost"
  • "blocks 5h", "janela de 5 horas"

Disambiguation — leia ANTES de chamar

Esta skill é sobre USD/tokens gastos pelo user com a API Claude. Três skills/comandos parecem similares no nome mas resolvem problemas diferentes — não confundir:

Skill / Tool Mede o quê Quando usar
cost-tracking (esta) USD reais gastos com Claude API (snapshot LiteLLM pricing) "Quanto gastei hoje?" / "Custo da fase 172?"
burn-rate-status (cmd) Error budget SLO queimando (ratio de erros vs target de disponibilidade) "Meu SLO está estourando?" / "Page on-call?"
risk-budget (skill SRE) Risco SRE acumulado (mudanças vs budget de error tolerance) "Posso fazer release hoje sem queimar budget?"
metrics-snapshot (tool) Golden signals do próprio kit-mcp server (latency p99, errors, traffic) "MCP server está saudável?"

Regra mnemônica: se a pergunta tem "$", "USD", "tokens", "fatura" → cost-tracking. Se tem "SLO", "5xx", "error rate", "on-call" → burn-rate-status ou risk-budget.

Regras absolutas

  • Modelo desconhecido NUNCA retorna $0 silencioso — entra em unknown_models[] com usd: null. Mostra esses modelos ao user para que ele saiba o que NÃO foi precificado.
  • Pricing tem stalenesspricing_staleness_days no output. Se > 30d, há pricing_warning. Refresh manual via npm run regen-pricing (M5) ou GH Action semanal.
  • Naming kebab-casecost-today, NÃO cost_today. Consistente com metrics-snapshot, reverse-sync.
  • cost-estimate é heurística — chars/4 ± 30%, sem tokenizer real na v1.37.0. O disclaimer no output explicita isso. NÃO citar valor exato para o user; sempre apresentar [low, high] ou avisar do range.
  • cost-phase é correlação, não medição direta — usa janela temporal inferida (mtime de SPEC.md + STATE.md.completed_at + git log). O campo correlation_confidence (high/medium/low/unknown) gradua a confiança. NUNCA reportar cost-phase como número exato sem dizer a confidence.
  • persist:true é opt-in — default off. Quando ligado, grava .planning/costs/<ts>.json (gitignored). Útil para histórico, ruim para CI ruidoso.
  • refresh_pricing:true é opt-in com side-effects — fetch http models.dev + cache em ~/.kit-mcp/pricing-cache.json TTL 24h. NÃO ligar por padrão (latência + risco rede + pollution de cache).
  • Timezone default é UTC — paridade com ccusage. Override via tz se o user quer "meu dia" local (ex: tz: "America/Sao_Paulo").
  • Blocks são janelas de 5h sliding com gap-detection — gap > 5h entre entries inicia novo bloco. Útil para ver "sessão de trabalho A" vs "sessão B" do mesmo dia.

Read the full file on GitHub · 282 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. 4d ago First seen · 282 lines · 52 tokens per session scan A 71ca8046e9f0

Subscribe to this mod's changes

cost-tracking is a skill published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 3,788 once invoked, about $0.0003 per session on Opus 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-09-03.

Related

Other skills, from other repositories