LeanCTX
A local context layer for coding agents: it understands the task, routes and compresses context and tracks the cost
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Reads the repository and runs development commands alongside the agent
- Mediates the context sent to the model
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/leanctxDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Install the tool
npm install -g lean-ctx-binInstall the binary: curl -fsSL https://leanctx.com/install.sh | sh (or brew tap yvgude/lean-ctx && brew install lean-ctx). Run it alongside your coding agent per the README.
Other ways from the author
curl -fsSL https://leanctx.com/install.sh | shUniversal binary install, no Rust needed.
This is third-party code. Review the repository files before installing.
What it does
LeanCTX runs locally alongside a coding agent and helps it read the repository, run development commands and send the model focused context. It understands the task, routes the right context to it, compresses what it sends and records cost and outcome in a local savings ledger. A shadow mode compares against a baseline. It installs as a binary and connects to different agents, with an additional skill and MCP integration. No config is required by default and all data stays on the machine.
Who it is for. For developers who want to cut the context volume and cost of coding agents without losing accuracy.
Good fit when
- The agent sends the model too much irrelevant context
- You need to measure and cut token spend on real work
- You want one local context layer across several agents
Not a fit when
- The project is small and context fits without loss anyway
- You cannot run a local service alongside the agent
Example request
Hook up LeanCTX and show how much context it compressed on this taskLimitations
Savings depend on the workload and enabled modes; the real effect is shown by the local ledger and shadow mode. LeanCTX does not install declared tools for you: fetching stays your step. The project is young and evolving, so interfaces may change.
How to disable. Disconnect LeanCTX from the agent and remove the binary (for example brew uninstall lean-ctx or npm rm -g lean-ctx-bin). Delete the MCP server from your client config if you added it.
Security check
- Reads the repository and runs development commands alongside the agent
- Mediates the context sent to the model
README in short
The README describes LeanCTX as a local context-engineering and cost-control layer for coding agents. It understands the task, routes and compresses context, tracks cost and outcome, and a shadow mode compares against a baseline. It stresses that the tool does not install dependencies for the user and runs locally with no required config. It shows install via script, Homebrew and npm, wiring to different agents, a skill and MCP. Apache-2.0 licensed.
FAQ
Does LeanCTX install external tools itself?
No. By project rule, fetching declared tools stays your step; LeanCTX does not run the install for you.
Where does the data go?
LeanCTX runs locally; the savings ledger and shadow mode are computed on the machine, and no config is required by default.
Related
Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins
A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself
An open source coding agent for the terminal and desktop with build and plan modes
Open prompt library with a Claude Code plugin, MCP server and CLI: search, fetch and improve prompts and skills from an agent