Agent skill · Data & Analytics

cache-efficiency

Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.

hoangsonwwgithub.com/hoangsonwwGitHub ↗
claude-codeMIT
Install
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cache-efficiency --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Path: plugins/ccam-analytics/skills/cache-efficiency/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 869
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Cache Efficiency Diagnose whether prompt caching is actually saving money, and where it is not. ## Input The user provides: **$ARGUMENTS** This may be: empty (analyze the whole fleet), "today" / "this week" / a date range, a session ID to scope the analysis, or a target like "hit rate > 80%". When empty, analyze all data from `/api/analytics`. ## Data Sources | Endpoint | Returns | |----------|---------| | `GET /api/analytics` | `tokens.total_input`, `tokens.total_output`, `tokens.total_cache_read`, `tokens.total_cache_write` (baselines pre-summed), plus `daily_sessions` | | `GET /api/sessions?limit=200` | Session list — each has model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: usage_extras with cache token detail) | | `GET /api/sessions/{id}` | Full session detail with nested agents and events, for drill-down on a flagged session | | `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — used to price cache read vs write spend | ### How cache economics work ``` cache_hit_rate = total_cache_read / (total_cache_read + total_input) cache_reuse = total_cache_read / t

What's inside
Steps it walks through
  1. Input
  2. Data Sources
  3. How cache economics work
  4. Report Sections
  5. 1. Fleet Cache Hit Rate
  6. 2. Write vs Read Reuse
  7. 3. Cache Spend Split
  8. 4. Sessions With Poor Reuse
  9. 5. Recommendations
  10. Output
More from Claude-Code-Agent-Monitor
All skills →
About this skill
What does the cache-efficiency skill do?

Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.

How do I install it?

Run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cache-efficiency --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From hoangsonww/Claude-Code-Agent-Monitor, a repository with 869 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going