Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By NodeNestorv0.10.1MITIn 1 marketplace
Input-side token compression for Claude Code: read dedup, differential reads, structural maps for code/markdown/markup/CSS, command-output compression (real rtk + built-in routes) across Bash and PowerShell, web page outlining, path-list folding, and MCP tool-output compression. Context-aware, multi-agent safe, tee-backed, fails open.
You run one by typing its /name in Claude Code.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Input-side token compression for Claude Code. Where rolling-context manages tokens already in your context, lean-context stops waste before it enters — and the two cooperate when both are installed. Everything is lossless-or-recoverable: the model either sees the real bytes, or an honest pointer/diff/tee to bytes it can get back with one more call. Every transform fails open.
An identical re-read of an unchanged file (same path/offset/limit, same content, same agent, within 20 min) is replaced by an orienting note (age, size, digest, outline) pointing at your earlier read. Escape valve: the next identical Read returns full content.
The big one. When you read a file you read before and it changed, lean-context sends only the changed hunks as a unified diff with real line numbers — everything else is "unchanged from what you already have." Read → edit → read-to-verify loops, which normally resend the whole file, now resend ~the diff. Only fires when your earlier read was served in full and is provably still in context (guarded by compaction + rolling-context signals); wholesale rewrites fall back to a full read; escape valve always applies.
The same engine that maps code maps markdown, HTML/Vue/Astro/SVG and CSS/SCSS: headings, landmark tags and selectors are kept with real line numbers, the prose or declarations between them are elided with counts. Measured on a real corpus, non-code files are a quarter of all first-read bytes and markdown is the single largest non-code extension, so this is not a side case.
Intent scales the threshold rather than switching mapping off. Treating "error-hunting" as a veto looked safe but cost most of the opportunity, because that vocabulary ("error", "failed", "debug") shows up in ordinary narration far more often than real debugging does. While the agent looks like it is investigating, only files past a much larger floor are mapped — where a full read would dominate the context anyway — and the escape valve still returns full content on the next identical Read.
codemap maps an entire directory in one call — folder tree, file-type counts, every code file's signatures with real line numbers, bodies elided. Measured 84% char reduction on a real 51-file repo. For orientation; the skill tells the model to Read real files before editing. Also fires automatically on large single-file code reads while exploring (never while error-hunting).
Three tiers, best first:
rtk pipe --filter <name> reshapes the already-captured output — your command runs completely untouched, we only shrink what enters context. Covers pytest, vitest, tsc, git log/diff/status, cargo/go test, mypy, ruff, prettier, grep, and more. Measured: a 300-test pytest run 8,679 → 322 chars (96%). rtk is lazy-downloaded (checksum-verified) on first session only if you opt in with LEAN_CONTEXT_RTK_DOWNLOAD=1, or point LEAN_CONTEXT_RTK at an existing binary.dotnet build, test runners, and npm/pnpm/yarn/pip install — keep errors/warnings/summary, drop the spam, dedupe repeated diagnostics.All command compression is backed by a tee file: the full output is written to disk and its path is in the header, so nothing aggressive is ever unrecoverable — one Read gets it all back.
Opt-in max coverage: set LEAN_CONTEXT_RTK_REWRITE=1 to also rewrite supported simple commands to their rtk equivalent before they run (git status → rtk git status), covering rtk's full ~50-command set born-compressed. Off by default because it changes the command that actually executes.
Identical matches within a file collapse with counts; per-file caps. Skipped entirely for error-hunting patterns (every occurrence may matter).
lean-context@nestor-plugins is listed by nodenestor/nestor-plugins — review the source before installing
npx claudepluginhub nodenestor/nestor-plugins --plugin lean-contextPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.