# Built a local pre-processing plugin for Claude Code after research & measuring real metrics (3,500+ tests, v1.22.1) — Looking for feedback & ideas

> Source: <https://dev.to/arcticfoxz_255bbe944bc015/built-a-local-pre-processing-plugin-for-claude-code-after-research-measuring-real-metrics-3500-485n>
> Published: 2026-09-07 07:11:16+00:00

Hi everyone,

I wanted to share a project I’ve been developing for my own workflow with Claude Code, and hopefully get some feedback and ideas from the community on where to take it next.

Working on large-scale, complex projects, I needed better control over context, token consumption, and security. Before building my own tool, I tested various plugins in the market. As someone who likes to measure and verify metrics independently, I ran tests on actual context usage and noticed that under large, messy repository conditions, results often varied from what was expected.

Since my projects involve sensitive codebases, I wanted a **deterministic local pre-processing layer** that sanitizes, budgets, and organizes data *before* anything is passed to Claude Code—ensuring zero unexpected data leaks and absolute predictability.

What started as a simple helper script turned into a serious engineering effort. I went through over 1,000 research papers and technical docs to refine context retention, token budgeting, and local redaction.

Building reliability tooling is a constant battle against edge cases: silent context loss, false successes, cross-platform path quirks (like Windows process locks), and state drift.

My rule became: *Never believe a bug is fixed until a test proves it.* 

Today, the plugin (`chamnan`) is at **v1.22.1**. It's built in pure Python (standard library only, zero external packages) and backed by **3,500+ automated tests**.

`.chamnan/` so Claude Code doesn't waste tokens re-discovering architecture across sessions.
I dogfood this daily, but since I built it to share with other developers working on large or privacy-conscious projects, I'd love to hear your thoughts:

If you're interested in the architecture or test setup, you can check out the repository here: [https://github.com/ArcticFox2029/chamnan](https://github.com/ArcticFox2029/chamnan)
