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
npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-compressiongit clone --depth 1 https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering.git /tmp/Agent-Skills-for-Context-Engineering
mkdir -p ~/.claude/skills
cp -r /tmp/Agent-Skills-for-Context-Engineering/skills/context-compression ~/.claude/skills/context-compressionPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# 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`. - Diagnosing why a long context is failing before choosing a mitigation: `context-degradation`. - Writing raw outputs, logs, or plans to files without summarizing them: `filesystem-context`. - Designing long-term semantic memory across sessions: `memory-systems`. - The model deciding when and where to rewrite its own context: `self-managed-context`. This skill still owns what the replacement text must preserve. ## Core Concepts
Details
- Skill name
context-compression- Path
skills/context-compression/SKILL.md- License
- MIT
- Repo updated
- 12 October 2026
FAQ
What does the Context Compression skill do?
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.
How do I install the Context Compression skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-compression. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Context Compression popular?
It lives in muratcankoylan/Agent-Skills-for-Context-Engineering, which has 18,259 GitHub stars and 1,508 forks, and is included in 3 curated skill lists.
Related skills
Context Degradation
18kmuratcankoylan/Agent-Skills-for-Context-Engineering
This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion, attention-pattern issues, and agent performance degradation caused by accumulated or conflicting context.
Context Engineering Collection
18kmuratcankoylan/Agent-Skills-for-Context-Engineering
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.
Context Fundamentals
18kmuratcankoylan/Agent-Skills-for-Context-Engineering
This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped attention curve, why context quality matters more than quantity, and the mental models needed to interpret every other context-engineering decision. Use this for conceptual explanation, onboarding, and background reading. Route operational work to the specialized skills: debugging attention failures goes to context-degradation, token-efficiency work goes to context-optimization, conversation summariza
Memory Systems
18kmuratcankoylan/Agent-Skills-for-Context-Engineering
This skill should be used for persistent semantic memory in agent systems: cross-session knowledge retention, entity tracking, temporal validity, graph or vector retrieval, memory consolidation, and memory benchmark selection. Route file-backed scratchpads to filesystem-context, handoff summaries to context-compression, and token-efficiency tactics to context-optimization.
Summarize Meeting
28kphuryn/pm-skills
Summarize a meeting transcript into structured notes with date, participants, topic, key decisions, summary points, and action items. Use when processing meeting recordings, creating meeting notes, writing meeting minutes, or recapping discussions.
Task Observer
3.7krebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities: logs patterns, user corrections and methodology worth preserving to the workspace, turns them into skill updates in a weekly review, and flags repeating work as new skills. Use during ANY multi-step task, agentic workflow, or work session. Also triggers in post-task feedback discussions and when the user mentions skill observations, the observation log, or skill taxonomy. Also known as "One Skill to Rule Them All" — trigger on this phrase too. IMPORTANT: invoke this skill before the FIRST tool call of any session and before writing o
Browse the most popular Claude skills, all productivity & notes skills, or write your own with the skills generator.