Context Diet

•
19
•

Reduces AI agent token spend by indexing codebases and querying targeted facts instead of loading entire files repeatedly.

Context Diet helps developers curb runaway AI API costs by stopping coding agents from swallowing whole files on every turn. By establishing a queryable index—such as a knowledge-graph MCP server, repo map, or document RAG index—agents retrieve only the exact facts required to answer a question, significantly reducing token consumption and tool call frequency. Designed for medium to large codebases, the skill provides a baseline-and-measure workflow to ensure that token drops are empirically proven while keeping answer quality intact.

Key Features

01Integration guidance for queryable knowledge indexes and MCP memory servers
02Comparative reporting framework to evaluate cost savings against response quality
03Baseline measurement workflow to record tokens and tool calls before and after indexing
04Configuration validation script to ensure MCP servers are properly wired and executable
05Guardrails to prevent over-optimization on small repositories that do not need indexing
0619 GitHub stars

Use Cases

01Preventing rapid context window exhaustion when querying large multi-file repositories
02Lowering API costs for developer workflows where agents repeatedly read the same files
03Replacing repetitive whole-file context loads with precise knowledge graph lookups