cpv-batch-caching-audit

cpv-batch-caching-audit is a command for coding agents from Emasoft/claude-plugins-validation. It costs 107 tokens per session (1,506 once invoked), scanned A, original, MIT.

A batch command that performs a read-only audit for prompt-cache invalidation problems across plugins. It runs one audit per plugin and reports the findings by severity.

In plain words
What is it for?
Use it with a marketplace, plugin list, local path, or GitHub URL to produce a fleet-wide cache audit; apply fixes separately afterward.
Why use it?
It shows which plugins have cache-related issues without changing their files, avoiding a manual audit of each one.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claude-plugins-validation plugin — 31 skills, 14 commands, 14 agents shipped together

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.

agentmods
npx agentmods add commands/emasoft/claude-plugins-validation/cpv-batch-caching-audit
Clone the repo
git clone --depth 1 https://github.com/Emasoft/claude-plugins-validation

Or install claude-plugins-validation, the plugin that ships this one along with the rest of its 31 skills, 14 commands, 14 agents.

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 cpv-batch-caching-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/emasoft/claude-plugins-validation/cpv-batch-caching-audit.svg)](https://agentmods.dev/commands/emasoft/claude-plugins-validation/cpv-batch-caching-audit)
Your own site
<a href="https://agentmods.dev/commands/emasoft/claude-plugins-validation/cpv-batch-caching-audit"><img src="https://agentmods.dev/badge/commands/emasoft/claude-plugins-validation/cpv-batch-caching-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 107 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,506 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00107 $0.01506
Opus 5 $0.00053 $0.00753
Sonnet 5 $0.00021 $0.00301
Haiku 4.5 $0.00011 $0.00151

Measured 4d ago against content hash 16796c5c5d52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cpv-batch-caching-audit scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/cpv-batch-caching-audit.md · 162 lines

How it starts

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

/cpv-batch-caching-audit — Read-only cache audit across many plugins

The cpv-cache-optimizer-agent's full workflow (audit → fix → re-validate → optional Phase-4 broader refactor) is expensive — each Phase-4 step requires interactive confirmation. For a fleet-wide "which plugins have cache-invalidation findings?" snapshot, this command runs only Phase 1 (audit) per plugin and returns the per-plugin severity table. Apply fixes later with /cpv-batch-caching-optimize.

Same input grammar as the rest of the batch family — single plugin local/URL, marketplace local/URL, list, @listfile, or comma-separated.

You are the orchestrator

You — the model running THIS turn — drive the batch from the main session. You do NOT audit anything yourself.

Step 0 — Resolve arguments

If no target was given, ask plain-text:

Which marketplace, plugin, or list should I cache-audit? Provide a path, URL, or @listfile.

Step 1 — Build the batch plan

BATCH_SPEC="$1"
MAX_PARALLEL=8

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/cpv_batch_orchestrator.py" plan \
  "$BATCH_SPEC" \
  --agent cpv-cache-optimizer-agent \
  --mode batch_audit \
  --max-parallel "$MAX_PARALLEL"

Capture the orchestrator's stdout (PLAN, STATUS_TABLE, SESSION_DIR, PLUGIN_COUNT, DISPATCH_GROUPS). Queue the initial status table for the claude-menu-system Stop hook (emitted post-turn via systemMessage — zero token cost, NEVER printed inline by the orchestrator):

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/print_menu.py" "$STATUS_TABLE"

NEVER print menu inline; the CMS Stop hook emits via systemMessage at turn end.

Step 2 — Dispatch audit agents in parallel

for plugin_index in group:
    plugin = plan.plugins[plugin_index]
    Agent(
      subagent_type: "cpv-cache-optimizer-agent",
      description: "Batch-cache-audit {plugin.display_name}",
      prompt: |
        <context>
        source: /cpv-batch-caching-audit
        mode: batch_audit
        plugin_index: {plugin.plugin_index}
        plugin_path: {plugin.abs_path}
        source_url: {plugin.source_url or "—"}
        display_name: {plugin.display_name}
        session_dir: {plan.session_dir}
        status_path: {plan.session_dir}/plugin-{plugin.plugin_index}.status.json
        </context>

        Run Phase 1 (Audit) of your standard cache workflow ONLY —
        skip Phase 2 (Fix), Phase 3 (Re-validate), and Phase 4
        (Broader refactor). Write per-plugin status JSON to
        `status_path` with the canonical batch_audit schema (see
        agents/cpv-cache-optimizer-agent.md). Audit-only, so set `after`
        equal to `before`:

          {
            "status_symbol": "✓" | "✗" | "⚠",
            "status_label": "clean" | "findings" | "warning-only",
            "before": {"critical": N, "major": N, "minor": N, "nit": N, "warning": N},
            "after":  {"critical": N, "major": N, "minor": N, "nit": N, "warning": N},
            "report_path": "<abs-path-to-cache-audit-report>",
            "notes": "<short summary, e.g. 0 CA-01, 2 CA-04>"
          }

        Return ONE line exactly:

          [plugin-{plugin.plugin_index}] {label}: <C>/<M>/<m>/<n>/<w> (status: {status_path})

        Do NOT render menus. Do NOT apply fixes. Do NOT ask the user
        whether to proceed — this is read-only audit mode.
      run_in_background: false
    )

Read the full file on GitHub · 162 lines

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. 4d ago First seen · 162 lines · 107 tokens per session scan A 16796c5c5d52

Subscribe to this mod's changes

cpv-batch-caching-audit is a command published in the GitHub repository Emasoft/claude-plugins-validation (4 stars, last pushed yesterday), licensed MIT. It adds 107 tokens to every session and 1,506 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.