Context Engineering Skill
Routes to the appropriate sub-skill from Koylan's
Agent-Skills-for-Context-Engineering
collection, located at:
references/context-engineering-skills/skills/<sub-skill>/SKILL.md
Setup
No setup required. This skill uses GitHub raw URLs as the primary method to fetch sub-skill documentation.
Sub-skill SKILL.md files are loaded directly from GitHub:
https://raw.githubusercontent.com/muratcankoylan/Agent-Skills-for-Context-Engineering/main/skills/<sub-skill>/SKILL.md
Example: For context-optimization, use:
https://raw.githubusercontent.com/muratcankoylan/Agent-Skills-for-Context-Engineering/main/skills/context-optimization/SKILL.md
Optional Enhancement (Offline Use):
For offline access or faster local reads, you can optionally initialize the git submodule:
git submodule update --init
This will populate the references/context-engineering-skills/ directory locally. When the local directory exists, the skill loader will prefer local files over GitHub fetches.
Sub-Skill Routing Table
Match the user's task to one sub-skill and read its SKILL.md before
proceeding. Load additional sub-skills only if the task spans multiple
domains.
| Task / trigger phrase |
Sub-skill directory |
| "optimize context", reduce token costs, KV-cache, context budgeting |
context-optimization |
| "context compression", summarize history, compaction, long sessions |
context-compression |
| "design multi-agent", supervisor pattern, swarm architecture, agent handoffs |
multi-agent-patterns |
| "implement memory", memory frameworks, Mem0, Zep, Letta, vector RAG |
memory-systems |
| "offload context to files", filesystem memory, scratch pads, dynamic discovery |
filesystem-context |
| "debug agent failure", lost-in-middle, context poisoning, degradation patterns |
context-degradation |
| "build agent tools", tool descriptions, MCP tools, tool consolidation |
tool-design |
| "evaluate agent", LLM-as-judge, test framework, quality gates |
evaluation |
| Advanced evaluation: rubrics, pairwise comparison, position bias |
advanced-evaluation |
| "understand context", context windows, attention mechanics, fundamentals |
context-fundamentals |
| "build background agent", sandboxed execution, hosted coding agent |
hosted-agents |
| "implement BDI", mental state modeling, belief-desire-intention |
bdi-mental-states |
| "start an LLM project", batch pipeline, task-model fit, project structure |
project-development |
How to Load a Sub-Skill
- Identify the best-matching row above.
- Check if the local sub-skill SKILL.md exists:
references/context-engineering-skills/skills/<sub-skill>/SKILL.md
- Follow the instructions in that file. Most sub-skills have a
references/
directory with detailed patterns — read those files only when the relevant
pattern is needed (progressive disclosure).
- If the user's task spans two sub-skills (e.g., memory + multi-agent), read
both SKILL.md files before responding.
Progressive Disclosure
Sub-skill SKILL.md files are compact routing documents. The deep content lives
in each sub-skill's references/ folder. Load reference files only when the
specific topic is active — do not bulk-load all references upfront.
Example:
references/context-engineering-skills/skills/context-optimization/references/
Read individual reference files from that directory only when the matching
pattern is needed.
1---2name: context-engineering3description: Comprehensive context engineering guidance for AI agent systems. Routes to specialized sub-skills for production agent work. Use when the user asks to: "optimize context", "reduce token costs", "context compression", "summarize conversation history", "design multi-agent system", "implement supervisor pattern", "create swarm architecture", "implement memory", "build memory system", "offload context to files", "use filesystem for agent memory", "debug agent failure", "diagnose context problems", "fix lost-in-middle", "build agent tools", "design agent tools", "evaluate agent performance", "build test framework", "implement LLM-as-judge", "understand context", "explain context windows", "build background agent", "implement BDI architecture", "start an LLM project", or any discussion of context degradation, attention patterns, multi-agent coordination, or production agent architecture.4---5
6# Context Engineering Skill
7
8Routes to the appropriate sub-skill from Koylan's
9[Agent-Skills-for-Context-Engineering](https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering)
10collection, located at:
11
12```
13references/context-engineering-skills/skills/<sub-skill>/SKILL.md
14```
15
16## Setup
17
18**No setup required.** This skill uses GitHub raw URLs as the primary method to fetch sub-skill documentation.
19
20Sub-skill SKILL.md files are loaded directly from GitHub:
21
22```
23https://raw.githubusercontent.com/muratcankoylan/Agent-Skills-for-Context-Engineering/main/skills/<sub-skill>/SKILL.md
24```
25
26Example: For `context-optimization`, use:
27```
28https://raw.githubusercontent.com/muratcankoylan/Agent-Skills-for-Context-Engineering/main/skills/context-optimization/SKILL.md
29```
30
31**Optional Enhancement (Offline Use):**
32For offline access or faster local reads, you can optionally initialize the git submodule:
33
34```bash
35git submodule update --init
36```
37
38This will populate the `references/context-engineering-skills/` directory locally. When the local directory exists, the skill loader will prefer local files over GitHub fetches.
39
40## Sub-Skill Routing Table
41
42Match the user's task to one sub-skill and **read its SKILL.md before
43proceeding**. Load additional sub-skills only if the task spans multiple
44domains.
45
46| Task / trigger phrase | Sub-skill directory |
47|---|---|
48| "optimize context", reduce token costs, KV-cache, context budgeting | `context-optimization` |
49| "context compression", summarize history, compaction, long sessions | `context-compression` |
50| "design multi-agent", supervisor pattern, swarm architecture, agent handoffs | `multi-agent-patterns` |
51| "implement memory", memory frameworks, Mem0, Zep, Letta, vector RAG | `memory-systems` |
52| "offload context to files", filesystem memory, scratch pads, dynamic discovery | `filesystem-context` |
53| "debug agent failure", lost-in-middle, context poisoning, degradation patterns | `context-degradation` |
54| "build agent tools", tool descriptions, MCP tools, tool consolidation | `tool-design` |
55| "evaluate agent", LLM-as-judge, test framework, quality gates | `evaluation` |
56| Advanced evaluation: rubrics, pairwise comparison, position bias | `advanced-evaluation` |
57| "understand context", context windows, attention mechanics, fundamentals | `context-fundamentals` |
58| "build background agent", sandboxed execution, hosted coding agent | `hosted-agents` |
59| "implement BDI", mental state modeling, belief-desire-intention | `bdi-mental-states` |
60| "start an LLM project", batch pipeline, task-model fit, project structure | `project-development` |
61
62## How to Load a Sub-Skill
63
641. Identify the best-matching row above.
652. Check if the local sub-skill SKILL.md exists:
66 ```
67 references/context-engineering-skills/skills/<sub-skill>/SKILL.md
68 ```
69 - **If the file exists locally:** Read it directly.
70 - **If the file does NOT exist** (e.g., submodule not initialized): Fetch from GitHub:
71 ```
72 https://raw.githubusercontent.com/muratcankoylan/Agent-Skills-for-Context-Engineering/main/skills/<sub-skill>/SKILL.md
73 ```
743. Follow the instructions in that file. Most sub-skills have a `references/`
75 directory with detailed patterns — read those files only when the relevant
76 pattern is needed (progressive disclosure).
774. If the user's task spans two sub-skills (e.g., memory + multi-agent), read
78 both SKILL.md files before responding.
79
80## Progressive Disclosure
81
82Sub-skill SKILL.md files are compact routing documents. The deep content lives
83in each sub-skill's `references/` folder. Load reference files only when the
84specific topic is active — do not bulk-load all references upfront.
85
86Example:
87```
88references/context-engineering-skills/skills/context-optimization/references/
89```
90Read individual reference files from that directory only when the matching
91pattern is needed.