cache-audit

Aggregate per-session cache.jsonl records into a project-wide prompt-cache read-ratio report.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Aggregate per-session cache.jsonl records into a project-wide prompt-cache read-ratio report. Use when the operator asks how effective prompt caching is, or as a periodic /loop check on harness cache discipline. Advisory only — writes a markdown report, never modifies configs.

Core Features & Use Cases

  • Collects per-session metrics from ~/.claude/metrics and per-session cache reads and creations.
  • Computes per-session medians, per-agent medians, and token totals, then renders a Markdown report.
  • Output: a single report file under ~/.claude/metrics/reports with a date stamp.

Quick Start

Run the cache-audit skill to generate the latest cache health report from the current metrics directory.

Frequently Asked Questions about cache-audit

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

FAQPage Schema
How do I generate a prompt-cache read-ratio report from session metrics?▼

To generate a prompt-cache read-ratio report, you can run the cache-audit skill, which aggregates per-session cache.jsonl records from the ~/.claude/metrics directory into a Markdown report. It computes per-session and per-agent medians along with token totals.

What is prompt-cache health and how is it measured?▼

Prompt-cache health measures the effectiveness of prompt caching by calculating cache reads versus creations. This skill computes per-session and per-agent medians, alongside token totals, to provide a project-wide cache read-ratio overview.

How do I check my harness cache discipline periodically?▼

You can check harness cache discipline by running this skill as a periodic loop check. It reads metrics from ~/.claude/metrics and outputs a date-stamped Markdown report to the reports subdirectory, highlighting cache effectiveness.

Does the cache audit skill modify any configuration files?▼

No, the cache audit skill is advisory only and never modifies configurations. It solely reads metrics data and writes a single Markdown report file to ~/.claude/metrics/reports without altering system settings.

What format is the cache health report saved in?▼

The cache health report is saved as a Markdown file. It is written to ~/.claude/metrics/reports/{YYYY-MM-DD}-cache.md, providing a concise, human-readable summary of cache reads and token totals.

Can I use this skill for project-wide metrics aggregation across multiple agents?▼

Yes, this skill aggregates per-session metrics into a project-wide report. It specifically computes per-agent medians and token totals, allowing you to evaluate cache effectiveness across different agents within the project.