SKILL.md
Context Engineering Review Skill
Most agent failures aren't model failures — they're context failures: instructions buried under retrieval dumps, stale history contradicting fresh facts, twelve tool definitions the task never needed. This skill audits the assembled window, not just the prompt text.
What This Skill Produces
- A context inventory: every component in the window, its size, and who put it there
- A keep / cut / restructure verdict per component, with the reasoning
- Ordering and cache-alignment fixes (stable prefix first, volatile content last)
- A token budget per component with an enforcement point
Required Inputs
Ask for (if not already provided):
- A real assembled context — an actual logged request (system prompt + messages + tools), not the template. If only the template exists, review that but flag that dynamic bloat is invisible
- The failure or goal — ignoring instructions? too expensive? inconsistent? slow?
- What varies per request (retrieval, history, user data) vs. what is static
- The model and its context limit, and current typical request size
Review Method
1. Inventory. List every component in window order: system prompt sections, tool definitions, retrieved documents, conversation history, few-shot examples, injected state. For each: token count (estimate if unlogged), static vs. dynamic, and owner.
2. Interrogate each component:
