Download for MacApple silicon, macOS 14+
Skill

context-compression

@muratcankoylan Updated 2026-10-12

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

With your agent

Install OMGSkills skill "muratcankoylan/Agent-Skills-for-Context-Engineering:skills/context-compression" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

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.