cache-inspector

cache-inspector is a skill for Claude Code, Codex from escapeboy/ai-prompts. It costs 50 tokens per session (1,097 once invoked), scanned B, original, MIT.

A skill for measuring how often reusable prompts and memories are served from a prompt cache, along with estimated cost savings and improvement suggestions.

In plain words
What is it for?
Use it to produce cache hit-rate and cost reports, decide what content to cache, and investigate caching trends or performance.
Why use it?
It helps explain high token costs, low cache reuse, and slow cache warm-up instead of relying on guesswork.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it to produce cache hit-rate and cost reports, decide what content to cache, and investigate caching trends or performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/escapeboy/ai-prompts/cache-inspector
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add escapeboy/ai-prompts --skill cache-inspector
Clone the repo
git clone --depth 1 https://github.com/escapeboy/ai-prompts

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cache-inspector

README.md
[![agentmods](https://agentmods.dev/badge/skills/escapeboy/ai-prompts/cache-inspector/github.svg)](https://agentmods.dev/skills/escapeboy/ai-prompts/cache-inspector)
Your own site
<a href="https://agentmods.dev/skills/escapeboy/ai-prompts/cache-inspector"><img src="https://agentmods.dev/badge/skills/escapeboy/ai-prompts/cache-inspector/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cache-inspector

Your own site · 80×15
<a href="https://agentmods.dev/skills/escapeboy/ai-prompts/cache-inspector"><img src="https://agentmods.dev/badge/skills/escapeboy/ai-prompts/cache-inspector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,097 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Agent Snooping · line 18
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 55
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 73
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01097
Opus 5.5 $0.00020 $0.00439
Sonnet 5.5 $0.00010 $0.00219
Haiku 4.5 $0.00005 $0.00110

Measured 27d ago against content hash 7405df62f2d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

cache-inspector scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| Producing a cost/hit-rate report or tracking trend over sessions | A one-off "is caching on?" check — read `~/.claude/settings/prompt-caching.json` |
01-global-optimization/skills/cache-inspector/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/cache-inspector — Prompt Cache Monitor

Inspects the Claude prompt caching system to report hit rates, cost savings, and optimization opportunities. Prompt caching saves 90% on re-reads of large content (system prompts, memories, tool definitions).

When to Use This Skill (and When NOT to)

Use this skill for Use a simpler approach for
Investigating why a session's token cost is high A single expensive read you already understand — just cache that content, no analysis needed
Diagnosing a low or slow-warming cache hit rate A fresh session that has simply not warmed yet — wait 2-3 messages before measuring
Deciding which memories/prompts are worth caching Content you already know is under 1024 tokens — it can't cache; expand or merge it directly
Producing a cost/hit-rate report or tracking trend over sessions A one-off "is caching on?" check — read ~/.claude/settings/prompt-caching.json

Start simple. Reach for this skill only when cache behaviour is actually costing tokens or you need to measure/optimize it — not to confirm a single obvious cache decision.

Usage

/cache-inspector [action]

Quick Examples

/cache-inspector             # Show current status (default)
/cache-inspector status      # Detailed cache status
/cache-inspector analyze     # Performance analysis with trends
/cache-inspector optimize    # Get actionable recommendations
/cache-inspector report      # Full report (save to file)
/cache-inspector clear       # Clear cache (for testing only)

Actions

Each action's full behaviour, options, and exact output shape are in references/actions.md — read it for the detail behind the summaries below.

Action Purpose
status (default) Current cache state: active entries, session hits/savings, health verdict.
analyze Deep performance analysis with hit-rate trend, cost impact, and optimization opportunities.
optimize Prioritized, actionable recommendations to raise the hit rate, with an estimated score delta.
report Full report (history, cost breakdown, inventory, TTL timeline, score); --save writes to .claude/learnings/cache-performance.md.
clear Clears all cached content (testing/stale-cache only). Confirms first; next session re-warms at full cost.

Read the full file on GitHub · 88 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed 7405df62f2d5
  2. 1mo ago First seen · 88 lines · 50 tokens per session scan B da8b0934cefc

Subscribe to this mod's changes

cache-inspector is a skill published in the GitHub repository escapeboy/ai-prompts (91 stars, last pushed 15d ago), licensed MIT. It adds 50 tokens to every session and 1,097 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

prompt-engineer

Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…

Jeffallan/claude-skills · 93 tokens

prompt-optimization

Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…

langwatch/langwatch · 105 tokens

omh-model-optimization

This is a Hermes-native model-optimization workflow skill.

rlaope/oh-my-hermes · 84 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens

seedance-vocab-en

This skill should be used when an English Seedance 2.0 prompt needs clearer production wording, less generic prose, or precise vocabulary for camera, lighting, motion, VFX, audio, and constraints. Route blocked prompts through seedance-filter for context and boundary review.

Emily2040/seedance-2.0 · 61 tokens