Minimal-claude-code context-engineering
Guidance for designing, auditing, and improving context supplied to LLM agents, prompts, tools, RAG/MCP servers, and multi-agent systems. Use when the task involves context selection, prompt or agent architecture, tool descriptions, retrieval context, memory, compaction, autonomy, or evaluation of LLM behavior.
install
source · Clone the upstream repo
git clone https://github.com/Byunk/minimal-claude-code
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Byunk/minimal-claude-code "$T" && mkdir -p ~/.claude/skills && cp -r "$T/context-engineering/skills/context-engineering" ~/.claude/skills/byunk-minimal-claude-code-context-engineering-533d99 && rm -rf "$T"
manifest:
context-engineering/skills/context-engineering/SKILL.mdsource content
Context Engineering
A practical guide for choosing, structuring, and evaluating the context supplied to LLM systems. It covers prompts, tool descriptions, retrieval, memory, compaction, autonomy, and agent architecture.
References
| # | Principle | File | Summary |
|---|---|---|---|
| 1 | Quality Over Quantity | | Include only relevant context. Precision beats exhaustiveness. |
| 2 | Start Minimal, Layer Progressively | | Begin with essentials, expand based on performance gaps. |
| 3 | Hierarchical Context Organization | | Structure context from general to specific. Use XML tags for disambiguation. |
| 4 | Multi-Dimensional Context | | Effective context spans task, domain, history, constraints, motivation, and format. |
| 5 | Simple Composable Patterns | | Prefer prompt chaining, routing, parallelization over complex frameworks. |
| 6 | Invest in Tool Design (ACI) | | Tool descriptions deserve as much effort as UIs. Calibrate action language for Claude 4.6. |
| 7 | Match Architecture to Complexity | | Choose the right pattern: chaining, routing, parallelization, orchestrator, or agent. |
| 8 | Transparency in Agent Planning | | Show planning steps. Use structured state tracking for long-horizon tasks. |
| 9 | Contextualize Retrieved Chunks | | Prepend explanatory context before embedding. Reduces retrieval failures by 35-67%. |
| 10 | Dynamic Context Adaptation | | Adjust context based on task complexity and model confidence. |
| 11 | Meta-Context | | Explain why information is provided. Use grounding directives to reduce hallucinations. |
| 12 | Ground Agents in Environment Feedback | | Use tool results and human checkpoints, not just model reasoning. |
| 13 | Test and Measure Systematically | | A/B test context variations. Measure accuracy, latency, reasoning quality. |
| 14 | Retrieve Generously, Filter Late | | Top-20 chunks outperform top-5. Don't over-filter prematurely. |
| 15 | Avoid Common Anti-Patterns | | Don't dump everything, over-abstract, overengineer, or inherit stale aggressive prompts. |
| 16 | Guide Model Thinking | | Control reasoning depth with adaptive thinking. Prevent overthinking on simple tasks. |
| 17 | Multi-Window State Management | | Externalize state for tasks spanning multiple context windows. |
| 18 | Calibrate Autonomy and Safety | | Tune action thresholds. Claude 4.6 defaults to high autonomy; set guardrails. |