ashlr-benchmark

ashlr-benchmark is a command for coding agents from ashlrai/ashlr-plugin. It costs 20 tokens per session (445 once invoked), scanned A, original, MIT.

A benchmark command that measures how much Ashlr’s snipCompact processing reduces source-code text size. It checks common source folders or a chosen file.

In plain words
What is it for?
Use it to compare raw and compacted byte counts for TypeScript, JavaScript, Python, Go, Rust, Java, and similar source files.
Why use it?
It gives a project-specific view of the text reduction instead of relying on a general estimate.

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 ashlr plugin — 11 skills, 36 commands, 5 agents, 7 hooks, 1 MCP server 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/ashlrai/ashlr-plugin/ashlr-benchmark
Clone the repo
git clone --depth 1 https://github.com/ashlrai/ashlr-plugin

Or install ashlr, the plugin that ships this one along with the rest of its 11 skills, 36 commands, 5 agents, 7 hooks, 1 MCP server.

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 ashlr-benchmark

README.md
[![agentmods](https://agentmods.dev/badge/commands/ashlrai/ashlr-plugin/ashlr-benchmark.svg)](https://agentmods.dev/commands/ashlrai/ashlr-plugin/ashlr-benchmark)
Your own site
<a href="https://agentmods.dev/commands/ashlrai/ashlr-plugin/ashlr-benchmark"><img src="https://agentmods.dev/badge/commands/ashlrai/ashlr-plugin/ashlr-benchmark.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 445 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.00020 $0.00445
Opus 5 $0.00010 $0.00222
Sonnet 5 $0.00004 $0.00089
Haiku 4.5 $0.00002 $0.00044

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

Security

Grade A, and why

ashlr-benchmark 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/ashlr-benchmark.md · 54 lines

What it actually says

Benchmark the plugin's snipCompact savings on the user's actual code.

Steps:

  1. Determine a target directory:

    • Prefer <cwd>/src if it exists.

    • Otherwise try <cwd>/lib, <cwd>/app, then <cwd> itself.

    • If none of these contain any .ts, .tsx, .js, .jsx, .py, .go, .rs, .java, or similar source files, tell the user:

      ashlr-benchmark: no source files detected in <cwd>.
      Run it against a specific file instead, e.g.:
        bun run ${CLAUDE_PLUGIN_ROOT}/servers/bench.ts --path <file>
      

      and stop.

  2. Run via Bash. The plugin root is exposed to hooks and commands via the ${CLAUDE_PLUGIN_ROOT} environment variable. If that variable is empty or unset, the plugin is not loaded — abort with this exact message and stop:

    ashlr plugin not loaded — run /plugin install ashlr@ashlr-marketplace first.
    

    Otherwise:

    bun run ${CLAUDE_PLUGIN_ROOT}/servers/bench.ts --dir <target-dir>
    
  3. Parse the output. The bench script prints a table of files with their raw byte counts vs. snipCompact byte counts and a percent saved. Reproduce the table in the response, then prepend a one-line headline:

    mean savings on files ≥ 2KB: X%
    

    Compute the mean across only files whose raw size is ≥ 2048 bytes (smaller files are pass-through in the redirect hook and skew the average).

  4. If the bench script fails (missing file, exit non-zero), surface stderr verbatim and suggest running with --path <single-file> to narrow the problem.

No preamble, no trailing summary — just the headline plus the table.

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 · 54 lines · 20 tokens per session scan A 8b5e6670fef7

Subscribe to this mod's changes

ashlr-benchmark is a command published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed 4d ago), licensed MIT. It adds 20 tokens to every session and 445 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.