TOOLS / 09
PROMPT THERMOMETER
Mide el costo real en tokens que Claude Code inyecta antes de que escribas una palabra.
Measures the real token cost Claude Code injects before you type a single word.
01
Para que sirveWhat it is for
Claude Code carga CLAUDE.md, MEMORY.md, descripciones de skills y de servidores MCP en cada mensaje. Prompt Thermometer cuenta esos tokens con el tokenizador real de Anthropic -- no bytes de archivo, no estimaciones de caracteres entre 4 -- y muestra el desglose por fuente y el total: el piso de contexto de la sesion.
Claude Code loads CLAUDE.md, MEMORY.md, skill descriptions, and MCP server descriptions into every message. Prompt Thermometer counts those tokens with Anthropic's real tokenizer -- not file bytes, not character-over-4 guesses -- and shows the per-source breakdown plus the total: the session's context floor.
02
Que mide exactamenteWhat it actually measures
Seis fuentes de inyeccion confirmadas por sesion de Claude Code: CLAUDE.md global del usuario, CLAUDE.md del proyecto, el indice de MEMORY.md, las descripciones de skills disponibles, las descripciones de servidores y herramientas MCP conectados, y el sobre base del harness (identidad del modelo, fecha, preambulo de herramientas).
Six confirmed injection sources per Claude Code session: the user's global CLAUDE.md, the project CLAUDE.md, the MEMORY.md auto-index, available skill descriptions, connected MCP server and tool descriptions, and the harness's base envelope (model identity, date, tool preamble).
- CLAUDE.md global del usuarioUser-global CLAUDE.md
- CLAUDE.md del proyectoProject CLAUDE.md
- Indice auto-inyectado de MEMORY.mdMEMORY.md auto-index
- Descripciones de skills disponiblesAvailable skill descriptions
- Descripciones de servidores/herramientas MCPMCP server/tool descriptions
- Sobre base del harness (no legible en disco)Harness base envelope (not readable from disk)
03
Por que bytes no es lo mismo que tokensWhy bytes are not tokens
Un archivo de 2,177 bytes no cuesta 2,177 bytes de contexto. El harness lo envuelve con encabezados, etiquetas de formato y bloques de sistema que pueden sumar 10-30% de sobrecosto. Prompt Thermometer reconstruye ese envoltorio y tokeniza el resultado real, no el archivo crudo.
A 2,177-byte file does not cost 2,177 bytes of context. The harness wraps it with headers, framing tags, and system blocks that can add 10-30% overhead. Prompt Thermometer reconstructs that wrapper and tokenizes the actual result, not the raw file.
04
Honestidad sobre precisionHonesty about precision
Con clave de API de Anthropic, cada cifra viene del endpoint real count_tokens. Sin clave, el modo --estimate-only sigue funcionando pero etiqueta cada cifra como estimada (caracteres entre 4). La herramienta nunca presenta una estimacion como si fuera un conteo exacto.
With an Anthropic API key, every figure comes from the real count_tokens endpoint. Without one, --estimate-only still runs but labels every figure as an estimate (char-over-4). The tool never presents an estimate as an exact count.
05
Como usarloHow to use it
-
01
Instalar el paquete en modo editable
Install the package in editable mode
uv pip install -e . -
02
Auditar el proyecto actual (piso de contexto propio)
Audit the current project (its own context floor)
python -m src.measure -
03
Auditar otro proyecto por ruta
Audit another project by path
python -m src.measure --project "j:/AI/Claude Code/Projects/osiris" -
04
Correr sin clave de API (todo etiquetado como estimado)
Run without an API key (everything labeled as estimate)
python -m src.measure --estimate-only -
05
Incluir el bloque de skills disponibles en el conteo
Include the available-skills block in the count
python -m src.measure --skills-reminder-file skills.txt -
06
Anadir un plan de reduccion tras el escaneo
Append a reduction plan after the scan
python -m src.measure --assess
06
Que necesitasWhat you need
- Python 3.10 o superior y uvPython 3.10 or higher, and uv
- Clave ANTHROPIC_API_KEY para conteos exactos (variable de entorno, .env local, o ~/.env)ANTHROPIC_API_KEY for exact counts (env var, local .env, or ~/.env)
07
IlustracionIllustration
08
LimitesLimits
- Sin clave de API solo entrega estimados por caracteres entre 4, no conteos realesWithout an API key it only delivers char-over-4 estimates, not real counts
- El sobre del harness no es legible desde disco; su conteo exacto requiere --mcp-observed-tokens tomado de un turno JSONL realThe harness envelope is not readable from disk; its exact count needs --mcp-observed-tokens from a real JSONL turn
- Mide la sesion de Claude Code, no el consumo de tokens de otras herramientas o modelosMeasures the Claude Code session, not token usage from other tools or models
AccesoAccess
Se comparte directo.Shared directly.
Mide el costo real en tokens que Claude Code inyecta antes de que escribas una palabra.
Measures the real token cost Claude Code injects before you type a single word.
Descargar .zip →Download .zip → EscribenosWrite to us
Verificacion. Comprueba el zip antes de abrirlo: sha256. En macOS: shasum -a 256 archivo.zip.Verification. Check the zip before opening it: sha256. On macOS: shasum -a 256 file.zip.
Licencia. Publicado bajo licencia MIT: libre de usar, modificar y redistribuir, incluso con fines comerciales, siempre que se conserve el aviso de copyright y de licencia. Se entrega tal cual (“as is”), sin garantía de ningún tipo; el uso es bajo tu propio riesgo y Chea Studios no responde por daños derivados de su uso. El .zip incluye su archivo LICENSE. Copyright © 2026 Chea Studios.License. Released under the MIT license: free to use, modify, and redistribute, including commercially, as long as the copyright and license notice are kept. Provided “as is,” with no warranty of any kind; use is at your own risk and Chea Studios is not liable for damages arising from its use. The .zip includes its LICENSE file. Copyright © 2026 Chea Studios.