ccc-bench

A command that runs retrieval benchmarks across all configured test collections, saves dated scorecards, and prints a summary.

In plain words
What is it for?
Use it to check search quality, including missed targets, result position, and recall among the top five or ten results.
Why use it?
It shows whether search is returning the expected files and helps detect retrieval regressions over time.

Command

Part of the ccc-tools plugin — 4 commands 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/iliaal/ccc-plugin/ccc-bench
Clone the repo
git clone --depth 1 https://github.com/iliaal/ccc-plugin

Or install ccc-tools, the plugin that ships this one along with the rest of its 4 commands.

Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 922 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.00022 $0.00922
Opus 5 $0.00011 $0.00461
Sonnet 5 $0.00004 $0.00184
Haiku 4.5 $0.00002 $0.00092

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

Security

Grade A, and why

ccc-bench 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 2d 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.

plugins/ccc-tools/commands/ccc-bench.md · 71 lines

How it starts

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

Run ccc retrieval regression check

Wraps ${CLAUDE_PLUGIN_ROOT}/bin/ccc-bench, which runs the benchmark runner against every *-eval.yaml corpus in the corpus directory, saves timestamped scorecards to history/, and prints a compact aggregates table.

Corpus directory resolution (first match wins):

  1. --corpus-dir DIR argument
  2. $CCC_BENCH_CORPUS_DIR environment variable
  3. $HOME/ai/retrieval-bench (fallback default)

Step 1: Run the benchmark

${CLAUDE_PLUGIN_ROOT}/bin/ccc-bench $ARGUMENTS

Indexing is expected to be warm (no re-index happens here — this only runs ccc search). Each corpus takes 10-60 seconds depending on case count. For a typical 2-corpus setup, total runtime is 1-3 minutes.

If the command runs for more than ~2 minutes, run it with run_in_background: true and poll the output file.

Step 2: Report the summary

Parse the summary table the script prints and surface the key aggregates for each corpus:

  • Cases count
  • Miss rate (% of queries where no ground-truth file landed in top-10)
  • Median first-hit rank (1 is ideal — target file came back as the top result)
  • Mean recall@5 and recall@10

Flag anything that looks off — the target thresholds are miss rate ≤ 10%, median first-hit ≤ 3, recall@10 ≥ 0.70. Below those, the corpus either has stale ground truth, or something in the retrieval stack actually regressed.

Step 3: Handle corpus drift gracefully

If the script reports CORPUS DRIFT for any corpus, it means expected_files in the YAML reference files that no longer exist in the project (renamed, deleted, or moved upstream). This is not a retrieval regression — it's the benchmark corpus going stale.

Read the scorecard file (the script prints the path) to see which ground-truth files are missing. Present the list to the user and offer to:

  1. Update the eval YAML to remove or replace the stale references
  2. Skip that corpus with --no-drift-check for this run only (fast mode, distorted numbers)
  3. Leave it alone — the drift check is doing its job by flagging it

Read the full file on GitHub · 71 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. 2d ago First seen · 71 lines · 22 tokens per session scan A 0ea259179900

Subscribe to this mod's changes

ccc-bench is a command published in the GitHub repository iliaal/ccc-plugin (1 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 922 once invoked, about $0.0001 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.