context-compression
When agent sessions generate millions of tokens of conversation history, compression becomes mandatory. The naive approach is aggressive compression to minimize tokens per request.
npx skills add sickn33/agentic-awesome-skills --skill context-compression --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 Use 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 ## Core Concepts Context compression trades token savings against information loss. Three production-ready approaches exist: 1. **Anchored Iterative Summarization**: Maintain structured, persistent summaries with explicit sections for session intent, file modifications, decisions, and next steps. When compression triggers, summarize only the newly-truncated span and merge with the existing summary. Structure forces preservation by dedicating sections to specific information types. 2. **Opaque Compres
- When to Use
- Core Concepts
- Detailed Topics
- Why Tokens-Per-Task Matters
- The Artifact Trail Problem
- Structured Summary Sections
- Compression Trigger Strategies
- Probe-Based Evaluation
- Evaluation Dimensions
- Practical Guidance
- Three-Phase Compression Workflow
- Using Example Artifacts as Seeds
- Implementing Anchored Iterative Summarization
- When to Use Each Approach
What does the context-compression skill do?
When agent sessions generate millions of tokens of conversation history, compression becomes mandatory. The naive approach is aggressive compression to minimize tokens per request.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill context-compression --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.