slmingol

Token Cache Analysis — Development skill for Claude Code

Development community

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

token-cache-analysis

[![Python](https://img.shields.io/badge/python-3.8%2B-3776ab?logo=python&logoColor=white)](https://python.org) [![No Dependencies](https://img.shields.io/badge/dependencies-none-3fb950)](https://github.com/slmingol/token-cache-analysis/blob/main/claude_cache.py) [![Last Commit](https://img.shields.io/github/last-commit/slmingol/token-cache-analysis?color=58a6ff)](https://github.com/slmingol/token-cache-analysis/commits/main) [![Stars](https://img.shields.io/github/stars/slmingol/token-cache-analysis?style=social)](https://github.com/slmingol/token-cache-analysis/stargazers) [![Claude Code](https://img.shields.io/badge/Claude%20Code-compatible-orange?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0tMiAxNWwtNS01IDEuNDEtMS40MUwxMCAxNC4xN2w3LjU5LTcuNTlMMTkgOGwtOSA5eiIvPjwvc3ZnPg==)](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