cache-audit

Audit Claude Code prompt caching configurations for ordering, dynamic injections, and tool stability.

7|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/chdalski/claude_orchestration --skill cache-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cache-audit
Source: https://github.com/chdalski/claude_orchestration/tree/main/.claude/skills/cache-audit
Command: npx skills add https://github.com/chdalski/claude_orchestration --skill cache-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The cache-audit Skill detects prompt caching anti-patterns and dynamic-content placement that cause cache misses, unnecessary token usage, and fragile session behavior in Claude Code setups. It consolidates many manual checks into a single scored report so teams can quickly identify and fix the issues that most impact performance and cost.

Core Features & Use Cases

  • Ordering checks: Verifies that static system prompts load before dynamic content and that CLAUDE.md files do not contain session-specific data.
  • Hook and message validation: Ensures hooks emit dynamic data via additionalContext/system-reminder messages instead of editing system prompts.
  • Tool, model, and size audits: Detects mid-session tool or model changes, checks MCP tool defer patterns, and estimates per-turn injected content size (git status, streaks, meeting syncs).
  • Fork and compaction review: Reviews compaction and subagent handoffs to ensure consistent prefixes and tool schemas.
  • Use case: Run during onboarding, CI checks, or debugging when sessions show frequent cache misses, unexpected behavior, or high token costs.

Quick Start

Run /cache-audit to analyze your Claude Code config and receive a scored report with prioritized fixes.

Frequently Asked Questions about cache-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit prompt caching configurations in Claude Code to reduce token usage?

To audit prompt caching configurations, run a cache audit that checks settings.json and CLAUDE.md for dynamic content placement, hook outputs, tool stability, and model switching. This generates a scored report to identify and fix issues causing unnecessary token usage and cache misses.

Why does my Claude Code session have frequent cache misses and high latency?

Frequent cache misses and high latency often stem from prompt caching anti-patterns like dynamic content injected into static system prompts, mid-session tool changes, or unstable compaction handoffs. Auditing your config detects these placement issues so you can stabilize session prefixes.

How do I check if Claude Code hooks are causing cache invalidation?

Check if hooks cause cache invalidation by verifying they emit dynamic data via additionalContext or system-reminder messages instead of directly editing system prompts. A cache audit reviews hook files and session configurations to detect this anti-pattern and prevent unnecessary cache misses.

What is the best way to validate MCP tool defer patterns and model switching for prompt caching?

The best way to validate MCP tool defer patterns and model switching is to run a cache audit that detects mid-session tool or model changes and estimates per-turn injected content size. This checks tool schemas and compaction patterns to ensure consistent prefixes and reduce token costs.

Does prompt caching in Claude Code work with git status injections and local user settings?

Prompt caching in Claude Code works with git status injections and local user settings when static system prompts load before dynamic content. A cache audit reads ~/.claude/settings.json and CLAUDE.md to verify ordering, estimate injected content sizes, and ensure session-specific data does not break the cache.

When should I run a prompt cache audit during Claude Code development?

Run a prompt cache audit during onboarding, CI checks, or debugging when sessions show frequent cache misses, unexpected behavior, or high token costs. The audit reviews skill definitions and MCP configurations to ensure consistent prefixes and tool schemas across compaction and subagent handoffs.