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.
npx skills add j4rk0r/claude-skills --skill usage-trackergit clone --depth 1 https://github.com/j4rk0r/claude-skillsWrote 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.
[](https://agentmods.dev/skills/j4rk0r/claude-skills/usage-tracker)<a href="https://agentmods.dev/skills/j4rk0r/claude-skills/usage-tracker"><img src="https://agentmods.dev/badge/skills/j4rk0r/claude-skills/usage-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.
<a href="https://agentmods.dev/skills/j4rk0r/claude-skills/usage-tracker"><img src="https://agentmods.dev/badge/skills/j4rk0r/claude-skills/usage-tracker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00194 | $0.03329 |
| Opus 5 | $0.00097 | $0.01665 |
| Sonnet 5 | $0.00039 | $0.00666 |
| Haiku 4.5 | $0.00019 | $0.00333 |
Grade C, and why
usage-tracker scanned grade C with 2 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 9d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- Si `chmod` falla (permiso denegado): verificar propietario con `ls -la` y usar `sudo chmod` solo si es necesario. Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat ~/.claude/usage.jsonl | python3 -c " How it starts
The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Usage Tracker
Gestiona el sistema de logging de consumo local de Claude Code y permite analizar el coste por petición del usuario.
Referencias
| Archivo | Cuándo cargar |
|---|---|
references/pricing.md |
MANDATORY al calcular o explicar costes en € |
references/log-usage.sh |
MANDATORY en install si el hook no existe |
references/usage-report.sh |
MANDATORY en install si el script no existe |
| No cargar los scripts | Para report, top-requests y status — solo se ejecutan |
Cómo funciona el coste por petición
Cada mensaje del usuario dispara múltiples tool calls en secuencia. El log registra cada tool call con el campo request = último mensaje del usuario que lo originó. Esto permite agrupar todos los tool calls de una petición y calcular su coste total.
Usuario: "revisa el módulo delsol"
└─ Read delsol.module → 1.200 tok ┐
└─ Grep hook_order → 80 tok │ mismo "request"
└─ Read DelsolService.php → 2.400 tok │ → coste total: 4.980 tok
└─ Bash phpcs delsol/ → 1.300 tok ┘
Para ver el coste por petición:
cat ~/.claude/usage.jsonl | python3 -c "
import json, sys
from collections import defaultdict
req = defaultdict(lambda: {'tok':0,'tools':[],'ts':''})
for line in sys.stdin:
try:
d = json.loads(line.strip())
r = d.get('request','—')[:80]
req[r]['tok'] += d.get('tok_total',0)
req[r]['ts'] = d.get('ts','')[:10]
req[r]['tools'].append(d.get('tool','?'))
except: pass
print(f'{'Tokens':>8} {'Tools':>5} Petición')
print('-'*80)
for r, v in sorted(req.items(), key=lambda x: -x[1]['tok'])[:15]:
print(f'{v[\"tok\"]:>8,} {len(v[\"tools\"]):>5} {r}')
"
Framework: antes de enviar una petición costosa
Antes de ejecutar, evalúa:
- ¿Necesitas el archivo completo? — Usa
offset/limiten Read si solo necesitas una sección concreta. - ¿Esta tarea es independiente? — Si sí, ábrela en una conversación nueva. El contexto acumulado puede multiplicar el coste real por 5-10x.
- ¿Puedes confirmar antes de leer? — Un Grep previo que verifica que el contenido existe evita un Read masivo en falso.
- ¿Hay un Agent call implícito? — Si la petición requiere "analizar todo X", anticipar que el coste real será 10-100x lo que mostrará el log.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 243 lines · 194 tokens per session scan C ac24e122d063
usage-tracker is a skill published in the GitHub repository j4rk0r/claude-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 194 tokens to every session and 3,329 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
shipkit-work-memory
Log session progress and save resume state. Infers from conversation and git. Triggers: 'log progress', 'session summary', 'checkpoint', 'save progress', 'end session'.
session-update
Use when the user says "update session", "log progress", "checkpoint session", or invokes /session-update — especially before /clear or handoff.
compact-manual
Claude Code skill for deterministic context compaction. Compresses the current Claude Code session to the clipboard for a manual rewind+paste workflow. A deterministic alternative to /compact that extracts literal dialog and truncates only tool outputs — no LLM summarization. Use when the user says 'compact the…
suede-onboarding
Suede-affiliated onboarding and activation strategy for first-run sequencing, empty states, setup checklists, activation milestones, time to value, and retention-linked measurement. Use when users sign up but fail to reach first value or the product needs a new first-session flow. NOT FOR: registration optimization…
quick-win-session
Generates guided first-action flows that help users achieve a meaningful result within 60 seconds to boost retention. Use when user wants quick win onboarding, time-to-value optimization, or first success moments.
google-apps-script
Build Google Apps Script automation for Sheets and Workspace. Custom menus, triggers (onEdit / time-driven / form submit), dialogs, sidebars, email batches, PDF export, external API. Use whenever the user wants to automate a Google Sheet, build a Sheets menu / sidebar / dialog, hit a Sheets row from email or a…