codesage-eval

codesage-eval is a command for Claude Code from iliaal/codesage. It costs 24 tokens per session (1,071 once invoked), scanned A, original, MIT.

A command that tests CodeSage search against real questions from a project's Claude Code session history. It builds a project-specific test collection from those past queries and reports the search results.

In plain words
What is it for?
Evaluate an onboarded project after it has enough session history, measure retrieval accuracy, and inspect which real queries find the right files.
Why use it?
It shows whether search works for the questions developers actually ask, rather than only for a general test suite.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the codesage-tools plugin — 1 skill, 10 commands, 2 agents, 1 hook shipped together

Good fit Evaluate an onboarded project after it has enough session history, measure retrieval accuracy, and inspect which real queries find the right files.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add iliaal/codesage
Claude Code
/plugin install codesage-tools

Made for: Claude Code.

Or install codesage-tools, the plugin that ships this one along with the rest of its 1 skill, 10 commands, 2 agents, 1 hook.

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 codesage-eval

README.md
[![agentmods](https://agentmods.dev/badge/commands/iliaal/codesage/codesage-eval/github.svg)](https://agentmods.dev/commands/iliaal/codesage/codesage-eval)
Your own site
<a href="https://agentmods.dev/commands/iliaal/codesage/codesage-eval"><img src="https://agentmods.dev/badge/commands/iliaal/codesage/codesage-eval/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 codesage-eval

Your own site · 80×15
<a href="https://agentmods.dev/commands/iliaal/codesage/codesage-eval"><img src="https://agentmods.dev/badge/commands/iliaal/codesage/codesage-eval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 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,071 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00024 $0.01071
Opus 5.5 $0.00010 $0.00428
Sonnet 5.5 $0.00005 $0.00214
Haiku 4.5 $0.00002 $0.00107

Measured 1mo ago against content hash 2cba27d06116, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codesage-eval 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 1mo 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/codesage-tools/commands/codesage-eval.md · 65 lines

How it starts

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

Evaluate CodeSage effectiveness on a specific project

Wraps ${CLAUDE_PLUGIN_ROOT}/bin/codesage-eval. Post-deployment effectiveness check: mine real user queries from this project's Claude Code session history, run them through CodeSage, and report how well retrieval performs on queries the user has asked on this codebase.

Use this AFTER /codesage-onboard. Mining requires enough Claude Code session history (rule of thumb: at least a dozen sessions with real queries). With --no-extract, an existing corpus replaces that prerequisite; session history and the extractor are not required.

This is separate from /codesage-bench, which runs a regression suite across all corpora under $CODESAGE_BENCH_CORPUS_DIR (default: ./bench-corpora). /codesage-eval builds a fresh project-specific corpus every run (unless --no-extract is passed).

Step 1: Validate arguments

$ARGUMENTS: first positional arg is the project path and must be an existing directory. For mining (without --no-extract), also require a corresponding ~/.claude/projects/<slug>/ directory with session transcripts and an available extractor. With --no-extract, require the existing <corpus-dir>/<project-name>-session-eval.yaml instead; do not require session history or the extractor. Both modes require a valid bench runner. Stop and explain any missing prerequisite for the selected mode.

Step 2: Run the eval

Read and follow the argument transport procedure. Use the eval command identifier with the parsed $ARGUMENTS values. The dispatcher runs ${CLAUDE_PLUGIN_ROOT}/bin/codesage-eval from the currently installed plugin.

The script does two things:

  1. Mines up to --max-cases (default 50) session-based eval cases from the project's Claude Code history. Writes them to <corpus-dir>/<project-name>-session-eval.yaml, overwriting any previous extract unless --no-extract is passed.
  2. Runs codesage-bench-runner against the fresh corpus and saves a timestamped scorecard under <corpus-dir>/history/.

Read the full file on GitHub · 65 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. 1mo ago Changed 2cba27d06116
  2. 1mo ago Changed · +1 lines a37f66f2a33a
  3. 2mo ago Changed 3656f9a2b87f
  4. 2mo ago Changed f4edad2851f1
  5. 3mo ago First seen · 64 lines · 24 tokens per session scan A 6fe8697d02fa

Subscribe to this mod's changes

codesage-eval is a command published in the GitHub repository iliaal/codesage (22 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 1,071 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

codesage-eval compared with commands from other repositories

codesage-eval next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codesage-evaliliaal/codesageCommand22todayMITA24Claude Code
visualizeHelweg/open-codebase-indexCommand235todayMITA7Claude Code
call-graphHelweg/open-codebase-indexCommand235todayMITA12Claude Code
peekHelweg/open-codebase-indexCommand235todayMITA10Claude Code
searchHelweg/open-codebase-indexCommand235todayMITA8Claude Code
indexHelweg/open-codebase-indexCommand235todayMITA7Claude Code
reindexHelweg/open-codebase-indexCommand235todayMITA8Claude Code