context-compression
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve decisions, files, risks, and next actions.
Install
Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.
git clone https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering /tmp/Agent-Skills-for-Context-Engineering && ln -s /tmp/Agent-Skills-for-Context-Engineering/skills/context-compression ~/.claude/skills/context-compression
From README
Context Compression Strategies When agent sessions generate millions of tokens of conversation history, compression becomes mandatory. The naive approach is aggressive compression to minimize tokens per request. The correct optimization target is tokens per task: total tokens consumed to complete a task, including re-fetching costs when compression loses critical information. When to Activate Activate this skill when: Agent sessions exceed context window limits Codebases exceed context windows (5M+ token systems) Designing conversation summarization strategies Debugging cases where agents "forget" what files they modified Building evaluation frameworks for compression quality Creating durable handoff summaries that preserve decisions, files, risks, and next actions Do not activate this skill for adjacent work owned by other skills: General token-efficiency tactics such as masking, prefix caching, or partitioning: context-optimization.
More from this repo
context-engineering-collection
A comprehensive collection of Agent Skills for context engineering, harness engineering, multi-agent architectures, and...
context-degradation
This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context...
context-fundamentals
This skill should be used to explain or reason about the foundational concepts of context engineering: what context is,...