When your agent sessions blow past context limits or you're working with multi-million token codebases, this breaks down three compression approaches with real tradeoffs. The key insight is optimizing for tokens per task, not tokens per request, because aggressive compression that loses file paths or error messages costs more in re-fetching than it saves. Anchored iterative summarization with structured sections (intent, files modified, decisions, next steps) outperforms naive approaches by forcing the summarizer to populate explicit categories. The weakest link across all methods is artifact trail integrity, scoring 2.2-2.5 out of 5.0, so expect to build separate file tracking if your agent needs reliable modification history. Includes probe-based evaluation strategies and a three-phase workflow for compressing large codebases into executable specs.

skills.sh installs
1.2K
GitHub stars
43.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill context-compression --agent claude-code

Installs into .claude/skills of the current project.

Files

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 approaches to evaluate for the current workload are:

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
First seen
Apr 16, 2026

More from sickn33/antigravity-awesome-skills

All 708

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs