Token Cache Analysis — Development skill for Claude Code
Claude Code prompt cache efficiency analysis scripts.
How to install Token Cache Analysis
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open slmingol/token-cache-analysis and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Token Cache Analysis does
Claude Code prompt cache efficiency analysis scripts.
Alternatives in Development
- Career-Ops For Codex — Read CLAUDE.md for all project instructions, routing, and behavioral rules 32.5k ★
- Interview Script — Create structured customer interview scripts with JTBD probing 7.8k ★
- Claude Hooks Mastery — 3,300+ Complete mastery guide for Claude Code hooks with production-ready scripts 3.4k ★
README
[](https://python.org) [](https://github.com/slmingol/token-cache-analysis/blob/main/claude_cache.py) [](https://github.com/slmingol/token-cache-analysis/commits/main) [](https://github.com/slmingol/token-cache-analysis/stargazers) [](https://claude.ai/code)
Scripts for analyzing Claude Code prompt cache usage across all local sessions.
Background
Claude Code writes tokens to two cache tiers:
| Tier | TTL | Cost | Reuse |
|---|---|---|---|
| 5m ephemeral | 5 minutes | cheap | low — expires before next turn in slow sessions |
| 1h ephemeral | 1 hour | higher | high — survives across most session turns |
High 5m% = paying for cache that expires before it's reused. High 1h% = efficient.
Scripts
`claude_cache.py` — Daily totals
Scans all sessions, shows **daily** cache write breakdown.
python3 claude_cache.py
Example output:
Scanning all Claude Code session files...
Date 5m cache 1h cache Total writes 5m %
------------------------------------------------------------------------------
2026-09-01 0 14,231,482 14,231,482 0.0%
2026-09-08
Related Skills
Codex Token Meter
Native macOS menu bar apps for tracking Codex and Claude Code token usage, quota, cache efficiency, cost, and
Flowmeter Public
Local, privacy-first token, cost, cache, and trace analysis for Cursor, Claude Code, and Codex. Optional Flow-
Claude Statusline Config
Personal ccstatusline config and cache metrics scripts for Claude Code
Benjamin Plus Skill
Benjamin-Plus: a measured token-efficiency skill for coding agents (−17.9% cost median, quality unchanged). In
Claude Architect
A plug-and-play framework for generating projects with Claude Code CLI — optimized for speed, token efficiency
Cc Statistics
270+ Three-in-one Claude Code stats: CLI + Web + native macOS SwiftUI panel. Token costs, code changes by lang
Related Agents
Usage Reporter
Reads real Claude Code usage from ~/.claude/stats-cache.json. Reports daily/weekly token usage by model, cache
Prompt Token Efficiency Verifier
AI Provider Expert
Primary reviewer for AI provider integrations, model routing, embeddings, prompt systems, streaming, token eff