Context Diet
Trim huge tool outputs into digests; full text stays one Read away.
Runs in the background, with no interface. These are illustrative logs.
Illustration. Actual results depend on the mod, terminal and environment.
Install
/plugin marketplace add drkokorev/context-diet
/plugin install context-diet@context-diet
/reload-pluginsRun these commands one at a time in a Claude Code session.
claude plugin marketplace add drkokorev/context-diet
claude plugin install context-diet@context-dietThen run /reload-plugins in your session, or start a new session.
Please install the Claude Code mod "Context Diet" (https://github.com/drkokorev/context-diet). Before installing, read the Security and Requirements sections of its README and tell me what it reads and writes, which commands it runs, whether it uses the network, and which Claude Code version, OS and terminal it needs. If everything looks fine, run claude plugin marketplace add drkokorev/context-diet and claude plugin install context-diet@context-diet, then remind me to run /reload-plugins in my session.Send this to Claude Code so it reads the author’s instructions before installing.
git clone https://github.com/drkokorev/context-diet
cd context-diet
claude --plugin-dir ./plugins/context-dietClone the repository and try it in a local session with --plugin-dir.
What it accesses
Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.
Reads
YesReads tool calls/results and Claude Code tool-results files for very long outputs.
Writes files
YesWrites full outputs under `.context-diet/` plus plugin-local counters and keep lists.
Runs commands
NoneNetwork
NoneIntroduction
Context Diet is a Claude Code function-hooks mod. Before long Bash, Grep, Glob, or JSON MCP results enter the conversation, it replaces them with a short digest (errors, summary, shape) and saves the full text under .context-diet/ for a later Read.
- Knows jest, vitest, pytest, go test, cargo, tsc, eslint, package installs, and docker build; repeated runs prefer a diff.
- Default cut at 8,000 characters (
/diet 16kto change)./dietopens the panel;drymeasures without cutting. - Optional
/diet capture onsaves whole test/build logs before digesting (rewrites the command text and may affect permission matching); off by default. - Author: no network, starts no programs; reads Claude Code
tool-resultsfiles and writes the plugin store. Needs Claude Code 2.1.287+; tested on macOS per README. Not run-tested here. Preview is illustrative.
Who it is for
- People whose test or build logs flood Claude Code context
Requirements
- Claude Code ≥ 2.1.287
- Platforms · macOS
- Author only states tested on macOS; works in terminal and Desktop Code tab.
- Optional capture rewrites some Bash commands and may re-prompt permissions.