$npx -y skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill Agent-Skills-for-Context-EngineeringA comprehensive collection of Agent Skills for context engineering, harness engineering, multi-agent architectures, and production agent systems. Use when building, optimizing, evaluating, or debugging agent systems that require effective context management and reliable operating
| 1 | # Agent Skills for Context Engineering |
| 2 | |
| 3 | This collection provides structured guidance for building production-grade AI agent systems through effective context engineering. |
| 4 | |
| 5 | ## When to Activate |
| 6 | |
| 7 | Activate these skills when: |
| 8 | - Building new agent systems from scratch |
| 9 | - Optimizing existing agent performance |
| 10 | - Debugging context-related failures |
| 11 | - Designing multi-agent architectures |
| 12 | - Creating or evaluating tools for agents |
| 13 | - Implementing memory and persistence layers |
| 14 | - Designing autonomous research or evaluation harnesses |
| 15 | |
| 16 | ## Skill Map |
| 17 | |
| 18 | ### Foundational Context Engineering |
| 19 | |
| 20 | **Understanding Context Fundamentals** |
| 21 | Context is not just prompt text—it is the complete state available to the language model at inference time, including system instructions, tool definitions, retrieved documents, message history, and tool outputs. Effective context engineering means understanding what information truly matters for the task at hand and curating that information for maximum signal-to-noise ratio. |
| 22 | |
| 23 | **Recognizing Context Degradation** |
| 24 | Language models exhibit predictable degradation patterns as context grows: the "lost-in-middle" phenomenon where information in the center of context receives less attention; U-shaped attention curves that prioritize beginning and end; context poisoning when errors compound; and context distraction when irrelevant information overwhelms relevant content. |
| 25 | |
| 26 | ### Architectural Patterns |
| 27 | |
| 28 | **Multi-Agent Coordination** |
| 29 | Production multi-agent systems converge on three dominant patterns: supervisor/orchestrator architectures with centralized control, peer-to-peer swarm architectures for flexible handoffs, and hierarchical structures for complex task decomposition. The critical insight is that sub-agents exist primarily to isolate context rather than to simulate organizational roles. |
| 30 | |
| 31 | **Long-Horizon Prompting** |
| 32 | Long-running autonomous agents and parallel orchestrations succeed or fail on the launch prompt. Pseudo-formal task briefs specify success predicates, non-counting outcomes, persistence rules with audit-gated return conditions, effort floors, diversity policies for parallel portfolios, and contamination guards, applying the discipline of formal verification linguistically to problems with no machine-checkable success condition. |
| 33 | |
| 34 | **Memory System Design** |
| 35 | Memory architectures range from simple scratchpads to sophisticated temporal knowledge graphs. Vector RAG provides semantic retrieval but loses relationship information. Knowledge graphs preserve structure but require more engineering investment. The file-system-as-memory pattern enables just-in-time context loading without stuffing context windows. |
| 36 | |
| 37 | **Filesystem-Based Context** |
| 38 | The filesystem provides a single interface for storing, retrieving, and updating effectively unlimited context. Key patterns include scratch pads for tool output offloading, plan persistence for long-horizon tasks, sub-agent communication via shared files, and dynamic skill loading. Agents use `ls`, `glob`, `grep`, and `read_file` for targeted context discovery, often outperforming semantic search for structural queries. |
| 39 | |
| 40 | **Hosted Agent Infrastructure** |
| 41 | Background coding agents run in remote sandboxed environments rather than on local machines. Key patterns include pre-built environment images refreshed on regular cadence, warm sandbox pools for instant session starts, filesystem snapshots for session persistence, and multiplayer support for collaborative agent sessions. Critical optimizations include allowing file reads before git sync completes (blocking only writes), predictive sandbox warming when users start typing, and self-spawning agents for parallel task execution. |
| 42 | |
| 43 | **Tool Design Principles** |
| 44 | Tools are contracts between deterministic systems and non-deterministic agents. Effective tool design follows the consolidation principle (prefer single comprehensive tools over multiple narrow ones), returns contextual information in errors, supports response format options for token efficiency, and uses clear namespacing. |
| 45 | |
| 46 | ### Operational Excellence |
| 47 | |
| 48 | **Context Compression** |
| 49 | When agent sessions exhaust memory, compression becomes mandatory. The correct optimization target is tokens-per-task, not tokens-per-request. Structured summarization with explicit sections for files, decisions, and next steps preserves more useful information than aggressive compression. Artifact trail integrity remains the weakest dimension across all compression methods. |
| 50 | |
| 51 | **Context Optimization** |
| 52 | Techniques include compaction (summarizing context near limits), observation masking (replacing verbose tool outputs with references), prefix caching (reusing KV blocks |