Agent skill
Context engineering collection
A comprehensive collection of Agent Skills for context engineering, harness engineering, multi‑agent architectures, and production agent systems. Use...
New to this? An agent skill is a file of instructions your AI assistant follows for one job. The text above is written for the assistant. How to use a skill
- It links to other files in its repo. Open the original to see them.
What it does
Context engineering collection is an agent workflow skill from muratcankoylan/
In short, it changes how your assistant plans and carries out multi step work.
The file is 136 lines long and is set out in parts such as “When to Activate”, “Skill Map”, “Foundational Context Engineering” and “Architectural Patterns”.
It is plain instructions, with no code to run.
When to use it
Reach for it when a task has several steps and you want the assistant to follow a routine.
It points to other files in its repo, so open the original to read those too.
It does not ask for special tools.
Safety check
Our checker read all 136 lines before we listed it.
It found no attack techniques, no hidden text and no steps that switch off your assistant's safety or send your data away.
It did flag one thing to know, listed above.
The text links to no outside sites.
It is shared under the MIT license.
Still read it before you use it, like any instructions you give your AI.
Open in the appOriginal on GitHub
What is inside
- When to Activate
- Skill Map
- Foundational Context Engineering
- Architectural Patterns
- Operational Excellence
- Development Methodology
- Cognitive Architecture
- Core Concepts
How to use it
- Claude Code: save the text as
.claude/skills/context-engineering-collection/SKILL.mdin your project. Claude reads it when a task needs it. - Claude, ChatGPT or Gemini: tap Copy skill and paste it into the chat. It arrives with a short line asking the assistant to use it.
- Cursor and other agents: add it to the project rules or instructions.
Read the full guide to using an agent skill
Want your own? How to write an agent skill that works
The full skill
--- name: context-engineering-collection description: "A 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 loops." --- # Agent Skills for Context Engineering This collection provides structured guidance for building production-grade AI agent systems through effective context engineering. ## When to Activate Activate these skills when: - Building new agent systems from scratch - Optimizing existing agent performance - Debugging context-related failures - Designing multi-agent architectures - Creating or evaluating tools for agents - Implementing memory and persistence layers - Designing autonomous research or evaluation harnesses ## Skill Map ### Foundational Context Engineering **Understanding Context Fundamentals** 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. **Recognizing Context Degradation** 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. ### Architectural Patterns **Multi-Agent Coordination** 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. **Long-Horizon Prompting** 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. In orchestrated runs, each worker returns an output contract with named checks, and only evidenced violations block the return. **Memory System Design** 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. **Filesystem-Based Context** 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. **Hosted Agent Infrastructure** 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. **Tool Design Principles** 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. ### Operational Excellence **Context Compression** 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. **Context Optimization** Techniques include compaction (summarizing context near limits), observation masking (replacing verbose tool outputs with references), prefix caching (reusing KV blocks across requests), and strategic context partitioning (splitting work across sub-agents with isolated contexts). **Self-Managed Context** The model, not the harness, decides what stays in its live context: the editable region is exposed as a file the model rewrites with code tools and re-parsed each turn. The harness keeps the invariants (pinned system and task prefix, role folding, edit gate, receipts, deterministic budget readouts, rollback on overflow). Edit cost scales with the text after the edit under prefix caching, so edits are batched and placed with the tail in mind; strategy can be steered by instruction, evolved as a skill, or trained with a success-gated efficiency reward. **Latent Briefing (KV Memory Sharing)** Orchestrator-worker systems can compound tokens when supervisors accumulate long trajectories but workers see only narrow text slices. Latent Briefing compacts the orchestrator trajectory in the worker model's KV cache using task-guided attention (Attention Matching-style compaction) so workers receive relevant latent state without full-text replay when the stack exposes worker KV state and the models are compatible. **Evaluation Frameworks** Production agent evaluation requires deterministic checks and multi-dimensional rubrics covering factual accuracy, completeness, tool efficiency, and process quality. Use model judges only after structure, evidence, and rubric math are valid; route judge design, pairwise comparison, and bias mitigation to Advanced Evaluation. **Harness Engineering** Reliable autonomous agents need explicit operating loops around the model: locked metrics, editable surfaces, durable logs, novelty checks, rollback rules, and human approval boundaries. Harnesses prevent agents from weakening the evaluator, losing state across compaction, or turning ambiguous goals into unreviewable changes. **Instruction-Surface Security** Inventory what a runtime loads as instructions and what grants capabilities. Keep proposed changes outside active loaders, require independent authorization for the exact effective change, and test a fresh session for unauthorized state or capability changes alongside legitimate task completion. **Self-Improvement Loops** When the harness itself becomes the optimization target, a different discipline applies: recursive self-improvement, meta-harness search, failure-driven bounded self-edits, evolutionary scaffold search, and context mechanism evolution. The controlling constraints are empirical two-split acceptance gates, filesystem experience archives with raw traces, runtime-enforced constraints outside every editable surface, and diversity preservation to prevent collapse. ### Development Methodology **Project Development** Effective LLM project development begins with task-model fit analysis: validating through manual prototyping that a task is well-suited for LLM processing before building automation. Production pipelines follow staged, idempotent architectures (acquire, prepare, process, parse, render) with file system state management for debugging and caching. Structured output design with explicit format specifications enables reliable parsing. Start with minimal architecture and add complexity only when proven necessary. ### Cognitive Architecture **BDI Mental States** Belief-desire-intention modeling provides a formal way to translate structured external context into agent mental states. Use it for rational agency, explainability, and systems that need auditable links between beliefs, goals, and chosen actions. ## Core Concepts The collection is organized around four core themes. First, context fundamentals establish what context is, how attention mechanisms work, and why context quality matters more than quantity. Second, architectural patterns cover the structures and coordination mechanisms that enable effective agent systems. Third, operational excellence addresses optimization, evaluation, and harness reliability. Fourth, development methodology and cognitive architecture cover project execution and formal mental-state modeling. ## Practical Guidance Each skill can be used independently or in combination. Start with fundamentals to establish context management mental models. Branch into architectural patterns based on your system requirements. Reference operational skills when optimizing production systems. The skills are platform-agnostic and work with Claude Code, Cursor, or any agent framework that supports custom instructions or skill-like constructs. ## Integration This collection integrates with itself—skills reference each other and build on shared concepts. The fundamentals skill provides context for all other skills. Architectural skills (multi-agent, memory, tools) can be combined for complex systems. Operational skills (optimization, evaluation) apply to any system built using the foundational and architectural skills. ## References Internal skills in this collection: - [context-fundamentals](skills/context-fundamentals/SKILL.md) - [context-degradation](skills/context-degradation/SKILL.md) - [context-compression](skills/context-compression/SKILL.md) - [multi-agent-patterns](skills/multi-agent-patterns/SKILL.md) - [long-horizon-prompting](skills/long-horizon-prompting/SKILL.md) - [memory-systems](skills/memory-systems/SKILL.md) - [tool-design](skills/tool-design/SKILL.md) - [filesystem-context](skills/filesystem-context/SKILL.md) - [hosted-agents](skills/hosted-agents/SKILL.md) - [context-optimization](skills/context-optimization/SKILL.md) - [self-managed-context](skills/self-managed-context/SKILL.md) - [latent-briefing](skills/latent-briefing/SKILL.md) - [evaluation](skills/evaluation/SKILL.md) - [advanced-evaluation](skills/advanced-evaluation/SKILL.md) - [harness-engineering](skills/harness-engineering/SKILL.md) - [instruction-surface-security](skills/instruction-surface-security/SKILL.md) - [self-improvement-loops](skills/self-improvement-loops/SKILL.md) - [project-development](skills/project-development/SKILL.md) - [bdi-mental-states](skills/bdi-mental-states/SKILL.md) External resources on context engineering: - Research on attention mechanisms and context window limitations - Production experience from leading AI labs on agent system design - Framework documentation for LangGraph, AutoGen, and CrewAI --- ## Skill Metadata **Created**: 2025-12-20 **Last Updated**: 2026-10-01 **Author**: Agent Skills for Context Engineering Contributors **Version**: 2.6.0
Copyright (c) 2025 Context Engineering Agent Skills Contributors.
Published under the MIT License, which you can read in full there.
Shown as published on GitHub, with credit and a link to the original.
Read it before you use it.
More skills
Advanced evaluation
This skill should be used for advanced LLM evaluation: LLM‑as‑judge systems, direct scoring, pairwise comparison, rubric calibration, evaluator bias mitigation...
Bdi mental states
This skill should be used when modeling agent mental states with BDI concepts: beliefs, desires, intentions, RDF‑to‑belief transformations, rational agency traces...
Evaluation
This skill should be used when building agent evaluation systems: deterministic checks, regression suites, multi‑dimensional rubrics, quality gates, production...
Try it in your browser
Today's AI news, one card per swipe.
Free to start.