Agent-Skills-for-Context-Engineering README

The project's README from github.com/muratcankoylan/Agent-Skills-for-Context-Engineering. As one markdown file: README.md.

Agent Skills for Context Engineering

A comprehensive, open collection of Agent Skills focused on context engineering and harness engineering principles for building production-grade AI agent systems. These skills teach the art and science of curating context, designing agent operating loops, and evaluating agent behavior across any agent platform.

Ask DeepWiki

What is Context Engineering?

Context engineering is the discipline of managing the language model's context window. Unlike prompt engineering, which focuses on crafting effective instructions, context engineering addresses the holistic curation of all information that enters the model's limited attention budget: system prompts, tool definitions, retrieved documents, message history, and tool outputs.

The fundamental challenge is that context windows are constrained not by raw token capacity but by attention mechanics. As context length increases, models exhibit predictable degradation patterns: the "lost-in-the-middle" phenomenon, U-shaped attention curves, and attention scarcity. Effective context engineering means finding the smallest possible set of high-signal tokens that maximize the likelihood of desired outcomes.

Recognition

This repository is cited in academic research as foundational work on static skill architecture:

"While static skills are well-recognized [Anthropic, 2025b; Muratcan Koylan, 2025], MCE is among the first to dynamically evolve them, bridging manual skill engineering and autonomous self-improvement."

  1. Meta Context Engineering via Agentic Skill Evolution, Peking University State Key Laboratory of General Artificial Intelligence (2025)
  2. Agent Harness Engineering: A Survey, CMU, Yale, JHU, NEU, Tulane, UAB, OSU, Virginia Tech, and Amazon (2026)

Skills Overview

Foundational Skills

These skills establish the foundational understanding required for all subsequent context engineering work.

Skill Description
context-fundamentals Understand what context is, why it matters, and the anatomy of context in agent systems
context-degradation Recognize patterns of context failure: lost-in-middle, poisoning, distraction, and clash
context-compression Design and evaluate compression strategies for long-running sessions

Architectural Skills

These skills cover the patterns and structures for building effective agent systems.

Skill Description
multi-agent-patterns Master orchestrator, peer-to-peer, and hierarchical multi-agent architectures
long-horizon-prompting NEW Write pseudo-formal task briefs for long-running autonomous agents and parallel orchestrations: exact success predicates, non-counting outcomes, audit-gated return conditions, effort floors, and diversity policies, modeled on the published GPT-5.6 Sol Ultra Cycle Double Cover prompt
memory-systems Design short-term, long-term, and graph-based memory architectures
tool-design Build tools that agents can use effectively
filesystem-context Use filesystems for dynamic context discovery, tool output offloading, and plan persistence
hosted-agents NEW Build background coding agents with sandboxed VMs, pre-built images, multiplayer support, and multi-client interfaces

Operational Skills

These skills address the ongoing operation and optimization of agent systems.

Skill Description
context-optimization Apply compaction, masking, and caching strategies
latent-briefing Share task-relevant orchestrator state with workers via task-guided KV cache compaction when the worker runtime is controllable
evaluation Build evaluation frameworks for agent systems
advanced-evaluation Master LLM-as-a-Judge techniques: direct scoring, pairwise comparison, rubric generation, and bias mitigation
harness-engineering Design autonomous agent harnesses with locked metrics, durable logs, novelty gates, rollback, and human approval boundaries
self-improvement-loops NEW Build loops where the harness itself is the optimization target: RSI, meta-harness search, failure-driven self-edits, evolutionary scaffold search, and acceptance gates for self-modifying systems

Development Methodology

These skills cover the meta-level practices for building LLM-powered projects.

Skill Description
project-development Design and build LLM projects from ideation through deployment, including task-model fit analysis, pipeline architecture, and structured output design

Cognitive Architecture Skills

These skills cover formal cognitive modeling for rational agent systems.

Skill Description
bdi-mental-states NEW Transform external RDF context into agent mental states (beliefs, desires, intentions) using formal BDI ontology patterns for deliberative reasoning and explainability

Design Philosophy

Progressive Disclosure

Each skill is structured for efficient context use. At startup, agents load only skill names and descriptions. Full content loads only when a skill is activated for relevant tasks.

Platform Agnosticism

These skills focus on transferable principles rather than vendor-specific implementations. The patterns work across Claude Code, Cursor, and any agent platform that supports skills or allows custom instructions.

Conceptual Foundation with Practical Examples

Scripts and examples demonstrate concepts using Python pseudocode that works across environments without requiring specific dependency installations.

Usage

Usage with Claude Code

This repository is a Claude Code Plugin Marketplace containing context engineering skills that Claude automatically discovers and activates based on your task context.

Installation

Step 1: Add the Marketplace

Run this command in Claude Code to register this repository as a plugin source:

/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering

Step 2: Install the Plugin

Option A - Browse and install:

  1. Select Browse and install plugins
  2. Select context-engineering-marketplace
  3. Select context-engineering
  4. Select Install now

Option B - Direct install via command:

/plugin install context-engineering@context-engineering-marketplace

This installs all published skills in a single plugin. Skills are activated automatically based on your task context.

Skill Activation Scenarios

Skill Activate When
context-fundamentals Establishing context-window mental models, planning agent architecture, or explaining how context components affect model behavior
context-degradation Diagnosing attention failures, context poisoning, lost-in-middle behavior, or degraded agent performance across long sessions
context-compression Preserving useful state while reducing conversation, tool-output, or trajectory size under context pressure
context-optimization Improving token efficiency, retrieval precision, prefix reuse, masking, partitioning, or budget allocation for agent systems
latent-briefing Sharing orchestrator trajectory with workers via task-guided KV cache compaction when the worker runtime is controllable and the models are compatible
multi-agent-patterns Choosing coordination patterns, isolating context across agents, designing handoffs, or evaluating whether parallel agents are justified
long-horizon-prompting Writing or evaluating the launch prompt for a long-running autonomous agent or parallel orchestration: success predicates, non-counting outcomes, persistence and stop rules, adversarial audit gates, and portfolio diversity policies
memory-systems Persisting cross-session knowledge, tracking entities over time, choosing memory frameworks, or designing retrieval and update semantics
tool-design Defining agent-tool contracts, consolidating tool surfaces, improving descriptions, or making tool errors actionable
filesystem-context Moving large or durable context into files, creating scratchpads, supporting just-in-time discovery, or coordinating agents through shared artifacts
hosted-agents Running coding agents in remote sandboxes, background environments, warm pools, or multiplayer agent infrastructure
evaluation Creating deterministic checks, rubrics, regression suites, production monitoring, or quality gates for agent behavior
advanced-evaluation Using LLM judges, pairwise comparison, calibration, bias mitigation, or human-aligned quality assessment
harness-engineering Designing autonomous loops with locked evaluators, editable surfaces, durable logs, novelty gates, rollback, and approval boundaries
self-improvement-loops Building loops that modify themselves: failure-driven harness self-edits, meta-harness search, evolutionary scaffold search, context mechanism evolution, and acceptance gates for self-modification
project-development Deciding whether an LLM is appropriate, shaping batch pipelines, creating staged artifacts, or estimating operational cost
bdi-mental-states Modeling beliefs, desires, intentions, rational action traces, or neuro-symbolic state transformations for agents
Screenshot 2025-12-26 at 12 34 47 PM

For Cursor, Codex, and Open Plugins

This repository ships as an Open Plugins plugin. Hosts discover skills from the repo-root skills/ directory (each subdirectory contains a SKILL.md file). The manifest lives at .plugin/plugin.json.

Cursor (recommended):

  1. Install from the Cursor Plugin Directory, or clone this repo and point Cursor at the plugin root.
  2. Cursor reads .plugin/plugin.json and discovers the repo-root skills/ directory through the Open Plugins manifest.
  3. For project-local manual installs, copy skill directories into .cursor/skills/. Do not rely on repository symlinks; they are fragile on Windows and in plugin packaging.

Codex / GitHub Copilot CLI / other Open Plugins hosts:

  1. Clone or add this repository as a plugin directory.
  2. The host reads .plugin/plugin.json and discovers all published skills under skills/.
  3. For project-local manual installs, copy skill directories into .codex/skills/ or the host's documented Agent Skills directory.

Using Individual Skills

Agent Skills require a directory layout, not a flat markdown file. Copy the skill folder into your project's skills directory:

# Example: add just the context-fundamentals skill to a Cursor project
mkdir -p .cursor/skills
cp -R skills/context-fundamentals .cursor/skills/

# Claude Code project-scoped install (same directory layout)
mkdir -p .claude/skills
cp -R skills/context-fundamentals .claude/skills/

# Codex project-scoped install
mkdir -p .codex/skills
cp -R skills/context-fundamentals .codex/skills/

# Generic Agent Skills repo-scoped install (Codex/OpenAI, Copilot CLI, Open Plugins hosts)
mkdir -p .agents/skills
cp -R skills/context-fundamentals .agents/skills/

Do not flatten SKILL.md into a single file at .claude/skills/context-fundamentals.md. That breaks relative references/ paths and violates the Agent Skills directory spec used by Cursor, Claude Code, and Codex.

Available skills: context-fundamentals, context-degradation, context-compression, context-optimization, latent-briefing, multi-agent-patterns, long-horizon-prompting, memory-systems, tool-design, filesystem-context, hosted-agents, evaluation, advanced-evaluation, harness-engineering, self-improvement-loops, project-development, bdi-mental-states

For Custom Implementations

Extract the principles and patterns from any skill and implement them in your agent framework. The skills are deliberately platform-agnostic.

Examples

The examples folder contains complete system designs that demonstrate how multiple skills work together in practice.

Example Description Skills Applied
digital-brain-skill NEW Personal operating system for founders and creators. Complete Claude Code skill with 6 modules, 4 automation scripts context-fundamentals, context-optimization, memory-systems, tool-design, multi-agent-patterns, evaluation, project-development
x-to-book-system Multi-agent system that monitors X accounts and generates daily synthesized books multi-agent-patterns, memory-systems, context-optimization, tool-design, evaluation
llm-as-judge-skills Production-ready LLM evaluation tools with TypeScript implementation, 19 passing tests advanced-evaluation, tool-design, context-fundamentals, evaluation
book-sft-pipeline Train models to write in any author's style. Includes Gertrude Stein case study with 70% human score on Pangram, $2 total cost project-development, context-compression, multi-agent-patterns, evaluation
interleaved-thinking Reasoning trace optimizer that captures, analyzes, and converts agent failure patterns into generated skills evaluation, advanced-evaluation, context-degradation, harness-engineering
long-horizon-prompt-lab Production-ready educational website: method guide, copyable task-brief template, four complete prompt rewrites, structural audits, and a caveated research/vendor reference catalog long-horizon-prompting, harness-engineering, multi-agent-patterns, advanced-evaluation

Each example includes:

Digital Brain Skill Example

The digital-brain-skill example is a complete personal operating system demonstrating comprehensive skills application:

Includes detailed traceability in HOW-SKILLS-BUILT-THIS.md mapping every architectural decision to specific skill principles.

LLM-as-Judge Skills Example

The llm-as-judge-skills example is a complete TypeScript implementation demonstrating:

Book SFT Pipeline Example

The book-sft-pipeline example demonstrates training small models (8B) to write in any author's style:

Integrates with context engineering skills: project-development, context-compression, multi-agent-patterns, evaluation.

Researcher Operating System

The researcher directory is a file-based operating system for turning external research into skill changes. It exists so this repository can act as a compounding source of truth instead of an anthology.

Measured router-benchmark results

The skill router (which decides whether the right skill gets loaded for a given task) has been benchmarked end-to-end against four frontier models via the Cursor SDK. Three full sweeps (50 prompts x 4 models x 3 replications = 600 calls each):

Per-skill effect size for the three skills the data flagged:

Skill Baseline top-1 After rewrite Delta
context-fundamentals 0.255 0.489 +23.4pp
project-development 0.750 1.000 +25pp (now perfect)
tool-design 0.729 0.807 +7.8pp

Per-model top-1 accuracy after the corpus-wide hardening pass:

Model Top-1 Top-3
gemini-3.1-pro 0.920 0.933
composer-2 0.913 0.947
gpt-5.5 0.913 0.973
claude-opus-4-7 0.840 0.933

Reproduce any of these numbers exactly via the runner under researcher/benchmarks/sdk-runner/.

What it includes

Current counts and compatibility status are generated in the live corpus inventory. Dated benchmark and release reports retain their original snapshot counts.

Agent-Skills-for-Context-Engineering (muratcankoylan/Agent-Skills-for-Context-Engineering)

Searching Database…

这是什么?一组精选的 Agent Skills,用来讲解上下文工程、多智能体架构和生产级智能体系统设计,让 AI 智能体在需要管理上下文、记忆、评估或 harness 设计时,能加载合适的技能。
这是一个库,还是一组插件技能?这是一个 Claude Code 插件市场 / Open Plugins 仓库:每个技能是一个目录,里面有 SKILL.md 和配套文件,而不是可以导入的 Python 包。
我该怎么安装这些技能?在 Claude Code 中,把这个仓库注册为插件市场,然后浏览并安装 'context-engineering' 插件(也可以直接用命令安装);如果用 Cursor、Codex 或其他 Open Plugins 宿主,请克隆仓库,让宿主读取 .plugin/plugin.json;也可以手动把某个技能文件夹复制到项目的 skills 目录中(例如 .cursor/skills/ 或 .codex/skills/)。
使用这些技能必须用 Claude Code 吗?不需要。这些技能与平台无关,文档中说明可在 Claude Code、Cursor、Codex 和 GitHub Copilot CLI 中使用,也适用于任何支持 Agent Skills 或自定义指令的宿主。
安装时有什么需要注意的坑吗?技能必须整个目录完整复制,不能压平成一个 markdown 文件;应避免使用符号链接,因为它们在 Windows 上和插件打包时会出问题。
包含多少个技能,它们是怎么分类的?共 17 个技能,分为基础、架构、运行、开发方法论和认知架构五类,涵盖 context-fundamentals、multi-agent-patterns、memory-systems、evaluation、harness-engineering、self-improvement-loops 等内容。
技能怎么避免撑爆上下文窗口?通过渐进式披露:智能体启动时只加载技能的名称和描述,只有当某个技能被相关任务激活时,才会加载它的完整内容。
这里说的 harness engineering 是什么意思?指设计自主智能体的运行循环,包含锁定的评估指标、持久化日志、新颖性门禁、回滚机制和人工审批边界,本质上是管理智能体如何运行的元系统。
有没有把这些技能组合起来的实际案例?有。examples/ 文件夹里有完整的系统设计示例,比如 'digital-brain-skill' 个人操作系统、从 X 到书的多智能体流水线、LLM-as-judge 评估工具,以及书籍风格的微调流水线,每个示例都列出了所组合使用的技能。
Size
36.3 MB
Stars
18.1K
Age
9mo
Commits · 90 Days