Defines context engineering as the discipline of curating all information inside an LLM's context window — system prompts, tool definitions, retrieved documents, message history, tool outputs — to counter degradation patterns such as 'lost-in-the-middle' and attention scarcity. Organizes the practice into composable skills across foundational concepts, architectural patterns (multi-agent, memory, tool design), and operational techniques (compaction, caching, LLM-as-a-Judge evaluation) for building production-grade agent systems.
What context engineering is
Prompt engineering is about writing good instructions. Context engineering is broader: it’s the discipline of curating everything that enters the model’s context window — system prompt, tool definitions, retrieved documents, message history, and tool outputs — because all of it competes for the same limited attention budget.
The constraint isn’t raw token capacity; it’s attention mechanics. As context grows, models degrade in predictable ways: the lost-in-the-middle effect where information in the center is neglected, U-shaped attention curves, and general attention scarcity. The goal is therefore not “fit more in” but the opposite — find the smallest set of high-signal tokens that reliably produces the outcome you want.
The skills
The practice breaks into composable skills across three layers. Each is a self-contained capability an agent loads only when a task calls for it.
Foundational — the concepts everything else builds on:
| Skill | Covers |
|---|---|
context-fundamentals |
What context is, why it matters, and its anatomy in agent systems. |
context-degradation |
Failure patterns: lost-in-the-middle, poisoning, distraction, and clash. |
context-compression |
Designing and evaluating compression for long sessions. |
Architectural — how agent systems are structured:
| Skill | Covers |
|---|---|
multi-agent-patterns |
Orchestrator, peer-to-peer, and hierarchical architectures. |
memory-systems |
Short-term, long-term, and graph-based memory. |
tool-design |
Building tools agents can actually use well. |
Operational — running and optimizing systems in production:
| Skill | Covers |
|---|---|
context-optimization |
Compaction, masking, and caching. |
evaluation |
Evaluation frameworks for agent systems. |
advanced-evaluation |
LLM-as-a-Judge: direct scoring, pairwise comparison, rubric generation, bias mitigation. |
project-development |
Taking an LLM project from ideation to deployment — task-model fit, pipeline architecture, structured output. |
Design principles
- Progressive disclosure. Agents load only skill names and descriptions at startup; a skill’s full body loads only when it’s activated. This keeps the context window lean until a capability is actually needed.
- Platform-agnostic. The skills teach transferable principles, not vendor implementations — they carry across Claude Code, Cursor, and any platform that supports skills or custom instructions.
- Concept plus example. Examples use Python pseudocode that runs anywhere, so the idea lands without a dependency install.
Worked examples
Complete system designs show how several skills combine in practice:
| Example | What it is | Skills applied |
|---|---|---|
digital-brain-skill |
A personal operating system built as a Claude Code skill (6 modules, 4 automation scripts). | fundamentals, optimization, memory, tool-design, multi-agent, evaluation, project-development |
x-to-book-system |
A multi-agent system that monitors accounts and generates a daily synthesized book. | multi-agent, memory, optimization, tool-design, evaluation |
llm-as-judge-skills |
Production-ready LLM evaluation tools with a TypeScript implementation. | advanced-evaluation, tool-design, fundamentals, evaluation |
book-sft-pipeline |
Trains models to write in a given author’s style. | project-development, compression, multi-agent, evaluation |
Each includes a full PRD, a skills map, and implementation guidance.
Case study: compression in Deep Agents
The Deep Agents SDK is a real-world example of these principles applied to long-running tasks — offloading tool inputs and outputs to a filesystem and summarizing conversation history to hold off context rot. See the technical deep dive: Context Management for Deep Agents.
- Context Engineering
- Context Window
- Lost-in-the-Middle
- Multi-Agent Patterns
- Memory Systems
- LLM-as-a-Judge


More Guides
Run disciplined SEO A/B tests in seven steps — one metric, two variations, randomized segments, run to significance, track, analyze the winner, and iterate.
Build a topic cluster in seven steps — select and score a pillar, validate it, map subtopics, align to intent, architect internal links, publish, and measure.
Prepare your site for AI search in five steps — content architecture, entity consistency, E-E-A-T, structured data, and machine-readable structure.
Get your content cited by AI in seven steps — answer capsules, link-free extraction, original data, digital PR, community presence, consistent messaging, and tracking.
A seven-step walkthrough for setting up Google Search Console on a new site — property type, DNS verification, sitemap, GA4 link, users, URL checks, and a monitoring routine.