context-compression

Solid

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.

AI & Automation 18 stars 1 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
43
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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`. ## Core Concepts Context compression trades token savings against information loss. Select from three production-ready approaches based on session characteristics: 1. **Anchored Iterative Summarization**: Implement this for long-running sessions where file tr...

Details

Author
docxology
Repository
docxology/template
Created
11 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category