whereismyai
Context Diet
Context Diet is a Claude Code mod that trims huge tool outputs into short digests before they fill context.
Context Diet is a mod for Claude Code that processes massive tool outputs before they reach the model's context window. When commands generate walls of text like test runs, build logs, JSON files, or git diffs, the tool replaces them with concise digests containing errors, summaries, and data shapes, while saving the full text to a file that Claude can read when needed. It works in the Claude Code terminal and the Claude desktop app, supporting inputs from test runners, build tools, logs, tables, CSVs, JSON, diffs, and grep results. The mod features automatic capture modes for failing tests, diff comparisons between repeated runs, and self-checking mechanisms to adjust thresholds based on usage. It maintains task accuracy while reducing the number of tool steps and token counts.
Context Diet at a glance
Key features
- Trims outputs longer than 8000 characters into structured digests
- Saves full output to a file for subsequent reading
- Captures complete test and build run outputs on failure
- Compares repeated command runs to show only changes
- Fails safe by passing whole output if saving fails
- Supports custom project-level exclusions and dry run modes
Use it for
- Reviewing test run failures and build errors without filling context
- Inspecting large JSON structures, tables, and CSV files
- Analyzing extensive grep match counts and file lists
- Comparing code changes alongside large lockfile diffs
Companions
Tools that articles about Context Diet recommend using with it, each with its job.
- Claude Code — Built to work with Claude Code.
- Claude — Built to work with Claude.
- Context7 — Provides up-to-date documentation for AI agents and code editors.
- Playwright MCP — Enables LLMs to interact with web pages using structured accessibility snapshots.
- GitHub MCP Server — Reads pull requests, issues and code search on GitHub.
- Superpowers — Brainstorm, plan and execute skills for bigger tasks.
Alternatives to Context Diet
- Claude Context — It reduces token costs and provides deep context for large codebases.
- Claude Code Mode — Reduces context token usage by returning only the final program result.
- My Claude Code Mods — Adds detailed session profiling, timeline snapshots, and loop detection to Claude Code.
- Context Tax — It audits session transcripts to reveal unused tokens and write fixes.
- Claude Mods — Improves readability of model output and tool calls.
- ZCF — It completes end-to-end environment initialization and proxy setup within minutes.
- Claude Code mods — Add live lines above the prompt, command guards, panes, and games to Claude Code.
- claude-mem — It shares persistent, searchable agent memory across sessions and devices.
- Catnap — It prevents mid-task interruptions by letting Claude finish its current piece of work before compacting.
- ModVet — Scans Claude Code mods offline in milliseconds with zero dependencies.
- claudecode.nvim — Adds native AI coding assistant functionality to Neovim.
- Fast Jev Compaction — It keeps tool calls and results verbatim using Jev decisions instead of summaries.
All Context Diet alternatives