ClaudeMods
☰
EN
● 0 online · Views 0 times
SponsorsSubmit a project
Reddit posts · by drkokorev

Context Diet: a Claude Code mod that keeps huge tool outputs from flooding the context

Context Diet trims large tool outputs (test runs, builds, diffs, logs) before Claude reads them, keeping only failures, summaries and relevant structure, and saves the full output to a file for later retrieval.

Translated

About this mod

A single test run or build log can dump 30–50k characters into Claude’s context, almost all of it noise: thousands of PASSED lines, deprecation warnings, lockfile diffs. The context fills up, compaction comes sooner, and Claude forgets what you said at the start.

Context Diet trims every big output before Claude reads it:

  • tests and builds (pytest, jest, go test, cargo, tsc…) → only the failures and the summary
  • JSON → its structure
  • diffs → without lockfile churn
  • logs → errors with context

The full output is always saved to a file, so Claude can read it when it needs more. Bonus: when a test run fails, Claude Code cuts the end of the output, exactly where the failures are. Context Diet gives them back.

Tested on 18 agent runs: same bugs fixed, 6 tool calls instead of 8.

Install:

/plugin marketplace add drkokorev/context-diet /plugin install context-diet@context-diet

https://github.com/drkokorev/context-diet

Installation

See the original source for installation instructions.

Original text / README

A single test run or build log can dump 30–50k characters into Claude’s context, almost all of it noise: thousands of PASSED lines, deprecation warnings, lockfile diffs. The context fills up, compaction comes sooner, and Claude forgets what you said at the start. Context Diet trims every big output before Claude reads it: tests and builds (pytest, jest, go test, cargo, tsc…) → only the failures and the summary JSON → its structure, diffs → without lockfile churn, logs → errors with context the full output is always saved to a file, so Claude can read it when it needs more Bonus: when a test run fails, Claude Code cuts the end of the output, exactly where the failures are. Context Diet gives them back. Tested on 18 agent runs: same bugs fixed, 6 tool calls instead of 8. /plugin marketplace add drkokorev/context-diet /plugin install context-diet@context-diet https://github.com/drkokorev/context-diet submitted by /u/drkokorev to r/ClaudeCodeMods [link] [comments]

Other works with the same name

Similar projects