What problem does it solve? Agent systems often fail or waste tokens because engineers lack a clear mental model of how context works—what it contains, how attention degrades with length, and how to budget it. This Skill provides the foundational concepts needed to design, debug, and optimize context in LLM agent systems. ## Core Features & Use Cases - Context Anatomy: Breaks down system prompts, tool definitions, retrieved documents, message history, and tool outputs with guidance on each component's constraints. - Attention & Budget Mechanics: Explains the n-squared attention cost, position encoding degradation, and why smaller high-signal context outperforms large low-signal context. - Progressive Disclosure Patterns: Shows how to defer loading of skills, references, and files until needed, with a technical reference and Python utilities for token estimation, context building, truncation, and validation. - Use Case: When designing a new agent, use this Skill to structure the system prompt at the right altitude, allocate a context budget across components, and set compaction triggers at 70-80% utilization. ## Quick Start Ask the agent to explain how to structure a system prompt and manage the context budget for a new agent design using the context-fundamentals skill.