omgskills Get the Mac app
Skill

context-compression

@muratcankoylan 17k stars Updated 2026-07-14 Author match: High

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.

Install 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

View on GitHub

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