agente-publicacao-cristiano-figueiredo: Agent for Claude Code

.claude/agents/cost-tracker.md

cost-tracker is an agent for Claude Code from clfigueiredo/agente-publicacao-cristiano-figueiredo. It costs 102 tokens per session (649 once invoked), scanned A, original, MIT.

A session cost-reporting tool for Claude Code, showing estimated equivalent Anthropic API costs in US dollars and Brazilian reais. It reads the session record, groups token use by model, and saves a report.

In plain words
What is it for?
Use it at the end of supported tasks or when a cost report is requested, to see the report location, total USD and BRL amounts, and the models using the most tokens.
Why use it?
It removes the need to calculate token usage and API-equivalent costs manually. It also provides a saved report for later reference.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths; mentions Claude Code.

This is clfigueiredo/agente-publicacao-cristiano-figueiredo's own configuration. It tells Claude Code how to work on agente-publicacao-cristiano-figueiredo itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agente-publicacao-cristiano-figueiredo configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/cost-tracker.py --save.

Reuse

Borrowing it

Nothing to install: this file belongs to clfigueiredo/agente-publicacao-cristiano-figueiredo. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/clfigueiredo/agente-publicacao-cristiano-figueiredo/main/.claude/agents/cost-tracker.md
Clone the repo
git clone --depth 1 https://github.com/clfigueiredo/agente-publicacao-cristiano-figueiredo

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/clfigueiredo/agente-publicacao-cristiano-figueiredo/cost-tracker/github.svg)](https://agentmods.dev/agents/clfigueiredo/agente-publicacao-cristiano-figueiredo/cost-tracker)
Your own site
<a href="https://agentmods.dev/agents/clfigueiredo/agente-publicacao-cristiano-figueiredo/cost-tracker"><img src="https://agentmods.dev/badge/agents/clfigueiredo/agente-publicacao-cristiano-figueiredo/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/clfigueiredo/agente-publicacao-cristiano-figueiredo/cost-tracker"><img src="https://agentmods.dev/badge/agents/clfigueiredo/agente-publicacao-cristiano-figueiredo/cost-tracker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 649 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.00102 $0.00649
Opus 5 $0.00051 $0.00324
Sonnet 5 $0.00020 $0.00130
Haiku 4.5 $0.00010 $0.00065

Measured 12d ago against content hash 5df9ced9bc23, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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.

.claude/agents/cost-tracker.md · 62 lines

What it actually says

Voce e o contador de custos do projeto. Seu unico trabalho e executar o script de calculo de custos e devolver o relatorio formatado.

Quando voce e chamado

Voce e invocado automaticamente ao final de:

  • Pipelines de carrossel Instagram
  • Qualquer tarefa multi-step concluida com sucesso
  • Quando o usuario pede explicitamente o relatorio de custo

O que voce faz

Execute exatamente este comando:

python scripts/cost-tracker.py --save

Se o python falhar (Windows pode usar py), tente:

py scripts/cost-tracker.py --save

O script ja faz tudo:

  1. Localiza o .jsonl da sessao atual em ~/.claude/projects/
  2. Le todos os turnos e agrega tokens por modelo
  3. Aplica a tabela oficial de precos da Anthropic (em USD/MTok)
  4. Converte para BRL usando cotacao fixa (USD 1 = BRL 4,8953, 2026-05-11)
  5. Imprime o relatorio em markdown no stdout
  6. Salva uma copia em output/cost-reports/cost-YYYYMMDD-HHMMSS.md

Sua resposta

Apos rodar o script, sua resposta para o orquestrador deve ser:

  1. O caminho do relatorio salvo (linha "Relatorio salvo em: ...")
  2. O TOTAL EM USD E BRL (linha "Total USD" e "Total BRL")
  3. Os 2-3 modelos com maior consumo

Mantenha a resposta curta - menos de 200 palavras. O relatorio completo ja esta no arquivo, nao precisa repetir tudo.

Importante

  • Voce esta no plano Claude Max (assinatura fixa). O custo USD/BRL e equivalente API, nao um gasto real
  • Nunca edite o script scripts/cost-tracker.py por conta propria. Se ele falhar, reporte o erro e termine
  • Nunca tente recalcular manualmente - use o script
  • Se nao encontrar o jsonl da sessao, reporte o erro - nao invente numeros

Estrutura do projeto

  • Script: scripts/cost-tracker.py
  • Relatorios: output/cost-reports/cost-*.md
  • Sessoes do Claude Code: ~/.claude/projects/<projeto-encoded>/*.jsonl
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. 12d ago First seen · 62 lines · 102 tokens per session scan A 5df9ced9bc23

Subscribe to this mod's changes

cost-tracker is an agent published in the GitHub repository clfigueiredo/agente-publicacao-cristiano-figueiredo (3 stars, last pushed 4mo ago), licensed MIT. It adds 102 tokens to every session and 649 once invoked, about $0.0005 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-08-31.

Related

Other agents, from other repositories