Observe
Run /skill-doctor in a Claude Code terminal to inspect visible skill context cost and never-invoked skills.
The context window is not storage. It's a budget of attention. This page maps the tools that help you spend it well.
I think context engineering will be absorbed by harness engineering, as one part of how a coding agent is built and run. I also expect "context engineer" to exist as a real job title within two years, to carry that work.
Prompt engineering optimizes one request. Context engineering optimizes the entire information architecture: what the model knows before any request begins.
When Claude generates generic output or ignores a convention, inspect the context it actually received before blaming the model. Missing, stale or noisy context is one possible cause; model limits and failed checks are others. The useful question is which cause the evidence supports.
The tools on this page attack that problem from different angles: compressing what enters the context, filtering what shouldn't, routing intelligently, and measuring the results.
| Dimension | Prompt Engineering | Context Engineering |
|---|---|---|
| Question | How to phrase this? | What should the model know? |
| Scope | Single request | Full system |
| Data source | Static user input | RAG, memory, tool outputs |
| Goal | One good response | Reliable system at scale |
| Approach | Heuristic, artisanal | Algorithmic, systematic |
Just-in-Time is an analogy here, not a claim that a smaller prompt makes a software team Lean. Start with one recurring task and the decision it must make.
Record the authoritative file, revision or retrieval time, and the relevant behavior. A repository path alone does not show that the agent saw current information.
Separate information present, generated, loaded and used. Check the resulting decision against a known failure and a nearby valid case.
Compare reviewer corrections, rework and the downstream result for similar tasks. Count retrieval and maintenance cost before turning a local fix into a permanent rule.
Test the corresponding harness control and follow the full request to the user.
Before picking tools, these mental models determine whether you're solving the right problem.
Provide exactly what the model needs, nothing more. Over-context degrades adherence as fast as under-context produces hallucinations.
As context length grows, models ignore information in the middle. Instructions at line 400 of a CLAUDE.md are followed ~60% as often as instructions at line 10.
Ultra-compressed context works not by verbatim recall, but by activating the model's pre-trained knowledge. 10 precise keywords can outperform 100 tokens of prose.
Each category intercepts at a different point in the pipeline, from CLI output to observability layer to operational loop closure.
Filter CLI and tool output before it reaches the model
Reduce input tokens before sending to the LLM
Routing, guardrails, and compression at the API layer
Improve retrieval quality and reduce retrieval noise
Persist context across sessions without flooding the window
Trace, measure, and improve your AI pipelines
Close the feedback loop: detect friction, propose config changes as PRs, and flag retirement candidates
A quiet skill may be obsolete, rarely needed, successfully preventive, or simply missing telemetry. The usage signal starts an investigation; it does not settle the decision.
Run /skill-doctor in a Claude Code terminal to inspect visible skill context cost and never-invoked skills.
The report requires v2.1.252 or later, excludes bundled and enterprise skills, depends on feature-flag fetching, and is unavailable through Remote Control.
Disable the candidate, run representative sessions with and without it, and combine those results with task frequency and failure severity.
Keep the retired version in Git history or outside discovered skill directories. An archive under .claude/skills/ can remain visible through nested discovery.
Human decision: account for ownership, assumptions, risk, and whether the skill encodes a temporary model gap or a durable team preference.
Skill retirement checklistEach figure names the quantity it measures. A saving on one layer, such as shell output or cached input, is not the same number as the cost of a whole task.
Eight public benchmarks measured token-saving tools end to end, and most results sit far below vendor claims. The site author is a core contributor to RTK. Compare claims and measurements β
Which tools matter depends on where you sit in the stack.
| Commands flooding context | RTK |
| Large files read repeatedly in session | lean-ctx (signatures mode) |
| Context growing too long | /compact at 70% |
| Rules ignored in large CLAUDE.md | Path-scoping |
| Session memory lost between runs | lean-ctx CCP |
| Cross-session memory | ICM |
| Tool output JSON too verbose | Headroom |
| Prompts too long | LLMLingua |
| Multi-provider routing | Portkey |
| RAG chunks losing context | Contextual Retrieval |
| Compression + routing for coding agents | Edgee |
| RAG quality measurement | Arize Phoenix |
| GPU memory fragmentation | vLLM (PagedAttention) |
| Shared-prefix cache reuse | SGLang (RadixAttention) |
| Repeated query caching | Redis semantic cache |
"Context engineering is the art of filling the context window with the right information at the right time."Andrej Karpathy
Three words carry the weight: right information (not all information), right time (not always-on for everything). The tools on this page are the mechanics behind making that "right" a system property rather than a manual judgment call.
The guide covers every tool with install instructions, measured benchmarks, and when-to-choose-what guidance, including LLMOps tools (Langfuse, LangSmith, Arize Phoenix), KV cache infrastructure (vLLM, SGLang), and the experimental catalog (SlimInfer, TopV, AttnComp).