From minimal-claude-code
Principles for designing context-efficient AI agents and tools. Use when designing LLM tools, agents, MCP servers, or multi-agent systems.
npx claudepluginhub byunk/minimal-claude-code --plugin minimal-claude-codeThis skill uses the workspace's default tool permissions.
Principles for maximizing LLM effectiveness by treating context as a finite resource.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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: