Memory & contextAppears in · Background / PaneAdded

Context Diet

Trim huge tool outputs into digests; full text stays one Read away.

Context Diet · Effect preview · IllustrationIllustrative
> Add pagination to the order list
⏺ I’ll look at the list component first.
[Context Diet: Bash 30372→1153 chars. Full: .context-diet/out-007.txt]
[jest] 611 passing not listed, 1 failing; summary + failure below
FAIL tests/refunds.test.ts
❯ /diet report

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-plugins

Run these commands one at a time in a Claude Code session.

What it accesses

Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.

Reads

Yes

Reads tool calls/results and Claude Code tool-results files for very long outputs.

Writes files

Yes

Writes full outputs under `.context-diet/` plus plugin-local counters and keep lists.

Runs commands

None

Network

None

Introduction

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 16k to change). /diet opens the panel; dry measures without cutting.
  • Optional /diet capture on saves 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-results files 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.