ashlr
v0.1.0 · MIT · For Claude Code Entry № 001 / Apr 14, 2026
The Token Ledger

Every tool call,
line-itemized.

An open-source Claude Code plugin that replaces the built-in file tools with compression-aware, genome-aware, budget-aware alternatives — and keeps an honest accounting of every token it saves you.

Session Ledger · ashlr-plugin v0.1.0
Live
15:32:01 ashlr__read src/agent/loop.ts · 412 lines 2,847
15:32:04 ashlr__grep query: "autopilot" · 18 hits 1,204
15:32:19 ashlr__read src/cli.ts · 1,103 lines 8,130
15:32:41 ashlr__grep .ashlrcode/genome/ · RAG hit 3,912
15:33:02 ashlr__edit src/providers/anthropic.ts · L84 412
15:33:17 ashlr__read src/__tests__/loop.test.ts 4,201
Session subtotal · 6 calls
20,706
claude code · session · ashlr:code active
$ working in ~/code/myapp
> explain how auth middleware works in this repo
 
ashlr__read src/middleware/auth.ts · saved +2,847 tok
ashlr__grep "requireAuth" · saved +1,204 tok
ashlr__read src/session/jwt.ts · saved +3,912 tok
ashlr__edit src/middleware/auth.ts:42 · saved +1,680 tok
 
auth middleware wraps every route with requireAuth() which verifies a JWT from the
Authorization header via verifyToken() in src/session/jwt.ts:18. I edited the
error branch to return 401 with a Retry-After header on expired tokens.
Session subtotal · 4 tool calls · ~79% saved +9,643 tok

Scripted animation. The numbers are real — see the benchmark.

Claude Code is brilliant. And expensive on long days.

Every Read returns the whole file. Every Grep returns every match. Every Edit ships the full before-and-after. The agent does what you asked — pays the tax one line-item at a time.

Running a long session on a mid-sized codebase, a Claude Code Max user pushes past 400K tokens per context window in under an hour of real work. Most of that is file contents the model has already seen, tool results no one will ever re-read, and prompt scaffolding re-sent on every turn.

Commercial plugins like WOZCODE ($20/week) fix this with proprietary MCP tools. ashlr does it in the open, using the token-efficiency library that already powers the ashlrcode CLI.

Same mechanism. Open source. Free.

Receipt № 7411 1 hour session
12 × Read (avg 4.2K)50,400
8 × Grep (raw rg)18,200
4 × Edit (full before+after)12,800
System prompt × 24 turns192,000
Re-sent context × 24141,600
Session total 415,000 tok
With ashlr (typical −46%) 224,100

Three tools. Three compressors. Same contract.

ashlr's MCP server exposes drop-in replacements for the file primitives Claude Code hits thousands of times per session. Each one composes primitives from @ashlr/core-efficiency — the shared library that also powers Mason's standalone ashlrcode CLI.

ashlr__read−46% avg

Reads a file, then runs snipCompact on tool-results larger than 2KB. Keeps head + tail; elides the middle. The agent almost never needs the middle.

// servers/efficiency-server.ts
const compact = snipCompact(msgs);
const out = compact[0]
  .content[0].content;
await recordSaving(
  raw.length, out.length
);
saved per call · 1,800 – 8,400 tok
ashlr__grep−62% with genome

If the project has a .ashlrcode/genome/, returns the top-scoring sections via TF-IDF or Ollama semantic search. Falls back to ripgrep otherwise — still slimmer than Grep's default.

if (genomeExists(cwd)) {
  const s = await retrieveSectionsV2(
    cwd, pattern, 4000
  );
  return formatGenomeForPrompt(s);
}
saved per call · 3,000 – 12,000 tok
ashlr__edit−31% avg

Sends a diff summary instead of full before-and-after contents. The agent already has the file in context — no need to ship it twice.

const summary = `[edit] ${path}
  - removed (${tokS} tok): ${...}
  + added   (${tokR} tok): ${...}`;
return summary;
saved per call · 200 – 1,800 tok

Benchmarked against the standard toolset. Nothing theoretical.

Run against the sibling @ashlr/core-efficiency repo on April 15, 2026. Every row is reproducible — commands below. Raw data: benchmarks.json.

File · size Raw tokens ashlr tokens Saved
src/compression/priority.ts · 0.5 KB 137 137 0.0%
src/tokens/index.ts · 1.5 KB 379 379 0.0%
src/compression/context.ts · 5.9 KB 1,517 406 −73.2%
src/genome/manifest.ts · 7.0 KB 1,807 406 −77.5%
src/genome/retriever.ts · 7.8 KB 2,001 406 −79.7%
src/genome/generations.ts · 11.2 KB 2,878 406 −85.9%

Files under 2 KB see 0% savings — snipCompact only fires on tool-results over 2,000 chars. That's by design: there's nothing to trim on a small file. The story is: mean −79.5% across files ≥ 2 KB. Agents read big files; big files see big savings.

Reproduce: bun run servers/bench.ts --dir <your-repo>/src

One is $20 a week. One is open-source.

WOZCODE pioneered the Claude-Code-plugin-as-token-efficiency-layer pattern. ashlr rebuilds it in the open, using the token-efficiency library that already ships in the ashlrcode CLI.

Built-in Claude Code WOZCODE ashlr
License Anthropic proprietary Proprietary (Woz, Inc.) MIT · open source
Price $20 / week Free
Account required No Woz account, OAuth login None
Token-efficient Read snipCompact
Genome-aware Grep Proprietary RAG TF-IDF + optional Ollama
Diff-format Edit
Savings tracker /woz-savings /ashlr-savings
Tri-agent delegation code/explore/plan code/explore/plan
Auditable source Installer only; tools compiled Every line, in the repo
Shared efficiency library @ashlr/core-efficiency

ashlr isn't trying to be better than WOZCODE on every axis. It's trying to exist, honestly, for the developers who want the mechanism without the subscription.

One library. Two consumers.

The efficiency tech isn't locked inside the plugin. It lives in @ashlr/core-efficiency — a separate package consumed by both the Claude Code plugin and the standalone ashlrcode CLI. Evolution happens in one place.

ashlrcode

Multi-provider AI
coding agent CLI

@ashlr/core-efficiency

Token-efficiency library

/genome 2,342 LOC
/compression ~220 LOC
/budget ~50 LOC
/tokens ~50 LOC

ashlr-plugin

Claude Code plugin
MCP server + agents

Two ways. Pick what feels right.

Prerequisites: bun ≥ 1.3 and Claude Code. Nothing else. No account, no login, no API key.

A

One-liner

Easiest. Pre-clones the plugin + runs bun install for you.

curl -fsSL plugin.ashlr.ai/install.sh | bash

Then inside Claude Code, run /plugin marketplace add masonwyatt23/ashlr-plugin and /plugin install ashlr@ashlr-marketplace. Restart.

B

Ask Claude Code

Paste this into any Claude Code session. It runs all the steps for you.

Install the ashlr-plugin for me:

# 1. Run in a terminal
curl -fsSL plugin.ashlr.ai/install.sh | bash

# 2. Then inside this session, run these two slash commands:
/plugin marketplace add masonwyatt23/ashlr-plugin
/plugin install ashlr@ashlr-marketplace

# 3. Restart this Claude Code session, then verify:
/ashlr-status

Claude Code will execute the shell, then the slash commands, then tell you to restart.

Verify it's working

Look for ashlr:code on the right side of the input. Or ask:

/ashlr-status    # plugin + MCP server health
/ashlr-savings   # running token-saving total
/ashlr-benchmark # benchmark this project's file sizes

Zero telemetry. Everything runs locally. Dependencies auto-install on first session via the SessionStart hook, so you can skip the manual bun install step entirely.