Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

context-engineering-collection — Claude Code skill: agent architecture

Patterns for production agent design: context management, multi-agent systems, long-running loops. Use when building autonomous systems that need to operate reliably.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-engineering-collection -a claude-code
Open on GitHub

What context-engineering-collection does

The skill provides structured guidance for engineering context in AI agents. It covers foundational concepts (how context degrades as it grows, attention loss in the middle), architectural patterns (multi-agent coordination, hierarchical structures, long-horizon prompts with formal task specifications) and operational practices (context compression, self-managed context via editable files, KV-memory sharing between orchestrator and workers, agent evaluation).

Practical patterns include using the filesystem as unlimited storage (discovery via ls, glob, grep instead of semantic search), designing tools as contracts between deterministic and non-deterministic systems, running background coding agents in isolated sandboxes. The source discusses vector RAG and knowledge graph tradeoffs, long-horizon prompting patterns with audit-gated return conditions, and compression strategies that preserve decision trail integrity.

Activate the skill when building systems from scratch, optimizing existing agents, debugging context-related failures, designing multi-agent architectures, or implementing memory and persistence layers.

What it helps with

  • design multi-agent systems with effective context isolation
  • manage context degradation in long agent sessions
  • build long-running autonomous loops with audit-gated conditions
  • compress context while preserving decision trail integrity
  • coordinate orchestrator and worker agents through shared state

Example prompts for the agent

  • Help me design a multi-agent system with hierarchical coordination for document processing
  • How do I build a long-running agent with explicit success predicates and audit-gated return conditions?
  • Show me filesystem-as-memory patterns instead of RAG for agent context

How to install context-engineering-collection

1Skills CLI (Vercel)

npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-engineering-collection -a claude-code

2Manually: put the files in place

~/.claude/skills/context-engineering-collection/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/context-engineering-collection/

Similar

asd-ste100 danyuchn Rewrites tool descriptions, system prompts, and agent instructions under ASD-STE100 rules. It eliminates ambiguity before downstream models parse the text. Claude Code CX Codex Cursor +1 7,300installs slack-messaging official anthropics This skill helps agents write Slack messages with mrkdwn, clear structure, and channel-aware etiquette. Use it for drafts, replies, and announcements. Claude Code CX Codex Cursor +1 3,900installs import-infrastructure-as-code official github Turns a live Azure subscription into Terraform built on Azure Verified Modules, with discovery, dependency mapping and the docs to back it up. GitHub Copilot 6,900installs paseo-handoff getpaseo Transfers the current task to a fresh agent with context, decisions, and constraints. Useful when moving work into a clean session or an isolated git worktree. Claude Code CX Codex Cursor +1 4,800installs capability-evolver EvoMap Runs autonomous self-evolution for AI agents based on runtime history. It syncs code improvements with EvoMap Hub via a local JSONL mailbox proxy. Claude Code CX Codex Cursor +1 4,900installs harness-creator walkinglabs Builds, audits, and fixes scaffolding for coding agents. It generates agent instructions, state files, and verification gates to stop task drift. Claude Code CX Codex Cursor +1 2,300installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs

Questions about context-engineering-collection

How do I install context-engineering-collection in Claude Code?

Run npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-engineering-collection -a claude-code. The skill will then load from ~/.claude/skills/context-engineering-collection/SKILL.md.

What does context-engineering-collection do?

It provides patterns and practices for designing production agents: context management at scale, multi-agent architectures, long-horizon prompts, context compression, and agent evaluation.

When should I activate this skill?

When building a new agent from scratch, optimizing existing agents, debugging context failures, designing multi-agent architectures, or implementing memory and persistence layers.

Source text

SKILL.md · MIT
---
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.

**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)
- [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

© muratcankoylan · MIT · muratcankoylan/Agent-Skills-for-Context-Engineering

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor