context-engineering
Principles for designing context-efficient AI agents and tools. Use when designing LLM tools, agents, MCP servers, or multi-agent systems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Principles for designing context-efficient AI agents and tools. Use when designing LLM tools, agents, MCP servers, or multi-agent systems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Clean Code principles for JavaScript and TypeScript. Covers naming, functions, classes, SOLID, testing, concurrency, error handling, formatting, and comments. Use when writing, refactoring, or reviewing JavaScript/TypeScript code.
Semantic code explanation that prioritizes why over what. Explains purpose, design decisions, and broader context of any code target. Accepts natural language: a file path, symbol name, line reference, directory, or question. Use when asked to "explain", "what does this do", "why is this here", or "walk me through".
Create a GitHub PR from the current feature branch. Auto-detects base branch, learns PR conventions from recent PRs, and generates a concise summary with a review guide. Use when asked to "create a PR", "open a PR", "make a pull request", or "submit PR".
Single-pass code review focused on clean code principles and OOP best practices. Auto-detects mode: PR number in arguments triggers PR mode (reads existing comments), uncommitted changes trigger local mode, feature branch triggers branch mode. Use when asked to "review code", "code review", "review my changes", or "review PR #N".
| name | context-engineering |
| description | Principles for designing context-efficient AI agents and tools. Use when designing LLM tools, agents, MCP servers, or multi-agent systems. |
| allowed-tools | ["Read","Glob","Grep"] |
Principles and patterns for strategically designing the information provided to LLMs. Context is a critical but finite resource — these principles help you use it well.
| # | Principle | File | Summary |
|---|---|---|---|
| 1 | Quality Over Quantity | 01-quality-over-quantity.md | Include only relevant context. Precision beats exhaustiveness. |
| 2 | Start Minimal, Layer Progressively | 02-start-minimal.md | Begin with essentials, expand based on performance gaps. |
| 3 | Hierarchical Context Organization | 03-hierarchical-organization.md | Structure context from general to specific. Use XML tags for disambiguation. |
| 4 | Multi-Dimensional Context | 04-multi-dimensional-context.md | Effective context spans task, domain, history, constraints, motivation, and format. |
| 5 | Simple Composable Patterns | 05-simple-composable-patterns.md | Prefer prompt chaining, routing, parallelization over complex frameworks. |
| 6 | Invest in Tool Design (ACI) | 06-invest-in-tool-design.md | Tool descriptions deserve as much effort as UIs. Calibrate action language for Claude 4.6. |
| 7 | Match Architecture to Complexity | 07-match-architecture-to-complexity.md | Choose the right pattern: chaining, routing, parallelization, orchestrator, or agent. |
| 8 | Transparency in Agent Planning | 08-transparency-in-planning.md | Show planning steps. Use structured state tracking for long-horizon tasks. |
| 9 | Contextualize Retrieved Chunks | 09-contextualize-retrieved-chunks.md | Prepend explanatory context before embedding. Reduces retrieval failures by 35-67%. |
| 10 | Dynamic Context Adaptation | 10-dynamic-context-adaptation.md | Adjust context based on task complexity and model confidence. |
| 11 | Meta-Context | 11-meta-context.md | Explain why information is provided. Use grounding directives to reduce hallucinations. |
| 12 | Ground Agents in Environment Feedback | 12-ground-in-environment.md | Use tool results and human checkpoints, not just model reasoning. |
| 13 | Test and Measure Systematically | 13-test-and-measure.md | A/B test context variations. Measure accuracy, latency, reasoning quality. |
| 14 | Retrieve Generously, Filter Late | 14-retrieve-generously.md | Top-20 chunks outperform top-5. Don't over-filter prematurely. |
| 15 | Avoid Common Anti-Patterns | 15-anti-patterns.md | Don't dump everything, over-abstract, overengineer, or inherit stale aggressive prompts. |
| 16 | Guide Model Thinking | 16-guide-model-thinking.md | Control reasoning depth with adaptive thinking. Prevent overthinking on simple tasks. |
| 17 | Multi-Window State Management | 17-multi-window-state.md | Externalize state for tasks spanning multiple context windows. |
| 18 | Calibrate Autonomy and Safety | 18-calibrate-autonomy.md | Tune action thresholds. Claude 4.6 defaults to high autonomy; set guardrails. |