Back to browse
GitHub Repository

Smarter reads, safer edits. An MCP plugin that cuts token usage and catches editing mistakes before they hit disk. Supports Claude Code, Gemini CLI, GitHub Copilot, and Codex.

22 starsTypeScript

Trueline – Hash-verified edits save 44% of Claude's output tokens

by rjkaes·Mar 5, 2026·2 points·0 comments

AI Analysis

●●●BangerBig BrainSolve My Problem

Hash-verified edits cut Claude editing tokens by 44%—measurable, specific, real win.

Strengths
  • Quantified token savings (44% for typical 15-line edits) with clear math—not vague claims.
  • Solves a real pain: string-matching edit failures on duplicate content and wasteful context padding.
Weaknesses
  • Requires Claude Code adoption; doesn't help users on other IDEs or LLM platforms.
  • Early-stage plugin ecosystem means adoption depends on Claude Code growth and MCP standardization.
Target Audience

Claude Code users, AI-assisted developers, prompt engineers optimizing token costs

Post Description

Claude Code's built-in Edit tool uses string matching. To change five lines, the model echoes back those exact lines as `old_string`, then provides the replacement. That echoed text is pure overhead (it's already in the file) and it's spending output tokens, the most expensive token class, just to say "I mean this part."

For a typical 15-line edit, that's ~200 wasted output tokens. Do a few dozen edits in a session and you're burning real money on text the model already knows is there. Worse, if `old_string` appears more than once in the file, the edit fails and the model has to pad extra context lines until the match is unique.

I built an MCP plugin that replaces string matching with line-range references and hash verification. The model says which lines to replace, proves it read them correctly with a checksum, and provides only the new content. A 15-line edit goes from ~470 output tokens to ~263. That's a 44% reduction. If the file changed since the last read (you saved in your editor, another tool touched it), the hash check catches it instead of silently applying a stale edit.

Install is two commands:

/plugin marketplace add rjkaes/trueline-mcp /plugin install trueline-mcp@trueline-mcp

Session hooks automatically redirect the agent to use trueline tools.

Inspired by Can Boluk's "The Harness Problem" and Seth Livingston's vscode-hashline-edit-tool for VS Code.

Blog post with more detail: https://www.wormbytes.ca/2026/03/04/trueline-mcp-announcemen...

Similar Projects

Developer Tools●●Solid

Ledger – Claude Code Token Spend Analyzer

Local SQLite ledger captures runaway Claude Code sessions before the bill shocks you.

Solve My ProblemCozy
tsv650
3022d ago
AI/ML●●Solid

Token Saving Tinyscreenshot Skill

4x token savings on screenshots with readable text at 800px grey.

Solve My ProblemBig Brain
franze
211mo ago