Built a local pre-processing plugin for Claude Code after research & measuring real metrics (3,500+ tests, v1.22.1) - Looking for feedback & ideas
How It Started
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.
The Struggle & Research
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.
What It Actually Does
It's NOT an AI-it's a pre-processing and reliability layer.
- Deterministic Context Budgeting: Pre-indexes and trims repository context before passing it to Claude Code (slashed Quick Index overhead dramatically in real-world tests).
- Local Security & Redaction: Runs local choke-point scrubbing so secrets and internal strings never leave your machine.
- Agent Continuity / Memory: Keeps track of session decisions, lessons, and project history locally inside
.chamnan/so Claude Code doesn't waste tokens re-discovering architecture across sessions. - Monorepo & Multi-adapter Support: Designed to handle nested checkouts, messy directory trees, and OS-specific edge cases cleanly.
Looking for Community Feedback
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:
- What edge cases or repository structures have broken your Claude Code workflows in the past?
- What safety verifications or context features would you like to see in a local helper plugin?
If you're interested in the architecture or test setup, you can check out the repository here: https://github.com/ArcticFox2029/chamnan
Appreciate any feedback!
Comments
No comments yet. Start the discussion.