/ashlr-benchmark
Measure snipCompact savings on files in the current project.
Slash command
In Claude Code, /ashlr-benchmark chooses a source directory in the current project and runs the plugin's servers/bench.ts --dir harness. It reports a table and the mean savings for files at least 2 KB. The harness scans JavaScript and TypeScript files and selects up to six of the largest eligible files; token counts are estimates. Results depend on the selected files and are not whole-session savings.
From a checkout, run the same harness on a directory or one file:
Reference benchmark runner
scripts/run-benchmark.ts is a separate read, grep, and edit benchmark. It defaults to the current repository and writes docs/benchmarks-v2.json, so use --dry-run to avoid overwriting that artifact when exploring.
| Flag | Effect |
|---|---|
--repo <path> | Select a git checkout to sample. |
--out <path> | Write results to a custom path. |
--dry-run | Print results without writing the output file. |
--compare | Print native and ashlr read-sample sizes. |
--validate-tokenizer | Sample API token counts when a usable ANTHROPIC_API_KEY is available; otherwise report that validation was skipped. |
The reference results and confidence intervals are described in the benchmark methodology. They measure a particular workload, not a guaranteed reduction for every project.