Reduce Claude Code and Codex token usage with slimctx

A free, open-source plugin that condenses tool output — git, tests, builds, installs, logs, JSON, file lists and grep — before Claude Code or OpenAI Codex CLI reads it. Nothing is lost: every condensed output keeps its original on disk, and the agent can read it back.

View on GitHub
82%fewer tool-output tokens on a real repository
0dependencies besides Node 18+
2hosts: Claude Code and Codex CLI
100%local — no network, no telemetry

Install in Claude Code

claude plugin marketplace add tauseefahmad/slimctx
claude plugin install slimctx@slimctx

Restart Claude Code. Run /slimctx:gain later to see what it saved, /slimctx:audit to see what loads before your first message, and /slimctx:doctor to check the setup.

Install in OpenAI Codex CLI

codex plugin marketplace add tauseefahmad/slimctx

Enable it in /plugins, then trust its hooks in /hooks.

What it does

Benchmark: slimctx vs rtk

commandrawrtkslimctx
git log -4016,5264,2291,835
git diff HEAD~350,45611,7194,995
ls -la6,6282,550642
find . -name "*.mjs"24,339—1,420
gh api …/issues (JSON)42,41742,41713,929
git status275147213

Estimated tokens. rtk does better on short git status; slimctx does better on long output, and keeps the original recoverable. Full table and method are in the README.

FAQ

How do I reduce Claude Code token usage?

Most tokens in a coding session are tool output. Condense it with slimctx, keep CLAUDE.md short, and clear the context between unrelated tasks.

Does it work with Codex?

Yes. The same repository is a Codex plugin, and it condenses Bash output there too, including failing commands.

Is my code sent anywhere?

No. Everything runs locally in Node.