From minimal-claude-code
Provides principles for designing context-efficient AI agents, LLM tools, MCP servers, and multi-agent systems. Optimizes token usage, compaction, and decision checklists for minimal context rot.
How this skill is triggered — by the user, by Claude, or both
Slash command
/minimal-claude-code:context-engineeringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Principles for maximizing LLM effectiveness by treating context as a finite resource.
Principles for maximizing LLM effectiveness by treating context as a finite resource.
Find the smallest possible set of high-signal tokens that maximize the likelihood of your desired outcome.
LLMs have an "attention budget" that depletes with each token. Context rot causes recall accuracy to decrease as token count grows. Every design decision should optimize for signal density.
| Challenge | Strategy | Reference |
|---|---|---|
| Too many tools | Curate minimal viable set | Tool |
| Ambiguous tool selection | Self-contained, unambiguous tools | Tool |
| Context pollution over time | Compaction and summarization | Agent |
| Long-horizon tasks | External memory and note-taking | Agent |
| Exceeding single context limits | Sub-agent architectures | Multi-Agent |
| MCP server bloat | Token-efficient responses | MCP |
| Measuring effectiveness | End-state evaluation | Evaluation |
Multi-agent adds ~15x token overhead. Use single agent unless:
| Factor | Single Agent | Multi-Agent |
|---|---|---|
| Parallelization | Sequential steps | Independent subtasks |
| Context size | Fits in window | Exceeds single context |
| Tool complexity | Focused toolset | Many specialized tools |
| Dependencies | Steps depend on each other | Work can be isolated |
Default to single agent. Add agents only when parallelization or context limits demand it.
Keep lightweight identifiers (paths, queries, links). Load data dynamically at runtime rather than pre-loading everything upfront.
Let agents discover context through exploration. File sizes suggest complexity; naming hints at purpose. Each interaction yields context for the next decision.
Summarize conversations nearing limits. Preserve architectural decisions and critical details; discard redundant tool outputs and verbose messages.
Persist notes to external memory (to-do lists, NOTES.md). Pull back into context when needed. Tracks progress without exhausting working context.
Delegate focused tasks to specialized agents with clean context windows. Each sub-agent explores extensively but returns only condensed summaries (1000-2000 tokens).
Do the simplest thing that works. Start minimal, add complexity only based on observed failure modes.
Complete examples from Claude Code:
npx claudepluginhub byunk/minimal-claude-code --plugin minimal-claude-codeTeaches context engineering for AI agents: managing context windows, memory systems, multi-agent coordination, and evaluation frameworks. Installable via Claude Code or Cursor.
Explains foundational concepts of context engineering: context window anatomy, attention mechanics, U-shaped attention curve, and why context quality matters more than quantity. Use for conceptual explanation and onboarding.
Explains foundational context engineering concepts: context windows, attention mechanics, U-shaped attention curve, and why context quality matters more than quantity. Use for conceptual onboarding and background reading.