context-compressor

Compresses file context into summaries, outlines, and diffs to reduce token usage.

1|Updated Sep 3, 2026
One-click install
npx skills add https://github.com/amanpal3/SKILLs --skill context-compressor-amanpal3
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-compressor
Source: https://github.com/amanpal3/SKILLs/tree/main/.agent/plugins/gsd/.agents/skills/context-compressor
Command: npx skills add https://github.com/amanpal3/SKILLs --skill context-compressor-amanpal3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long coding sessions exhaust the LLM context window because full files are repeatedly loaded and kept in memory, degrading performance and increasing token costs. ## Core Features & Use Cases - Five Compression Strategies: Summary, Outline, Diff-Only, Reference, and Progressive Disclosure modes for representing files at different fidelity levels. - Automatic Compression Triggers: Threshold-based rules that compress context at 50% and 70% token budget usage or when switching tasks. - Decompression Protocol: A controlled process for reloading only the specific sections needed, then re-compressing afterward. - Use Case: While debugging a large codebase, an agent summarizes each file after understanding it, tracks files in a reference table, and reloads only the relevant function when a bug appears instead of re-reading entire files. ## Quick Start Ask the agent to apply context compression strategies to summarize the files it has already read and track them in a reference table.

Frequently Asked Questions about context-compressor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce token usage when an AI agent reads many files?▼

Use context compression strategies: create a summary after understanding each file, use outlines for structural awareness, and track files in a reference table. Reload only specific sections when details are needed instead of re-reading full files.

What is progressive disclosure in context management?▼

Progressive disclosure loads information in escalating levels: start with a file outline, then load key functions, then related code, and only load the full file as a last resort. This keeps token usage proportional to actual need.

When should context compression be triggered?▼

Compress after fully understanding a file, when switching tasks, at 50% token budget for outline mode, at 70% for summary-only mode, and at the end of each work wave for a full compression pass.

What are the limitations of context compression?▼

Over-compression can lose details needed for debugging, requiring decompression and reloading sections. Skipping compression to save time typically costs more tokens later, so summaries must capture purpose, exports, dependencies, and gotchas accurately.