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

  • Benjamin Plus Skill — Benjamin-Plus: a measured token-efficiency skill for coding agents (−17.9% cost median, quality unchanged) 272 ★
  • Caveman Micro — 6-line caveman micro prompt (85 tokens) that outperformed the original 552-token skill 162 ★
  • Compact 서비스 (대화 요약) — 관찰 위치: Claude Code 내부 아키텍처 변수: NO_TOOLS_PREAMBLE, BASE_COMPACT_PROMPT, PARTIAL_COMPACT_PROMPT, PARTIAL_COMPACT 149 ★

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