context-compression

Compress LLM conversation context using anchored iterative summarization.

10|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/viktorbezdek/skillstack --skill context-compression-viktorbezdek
Or copy as Structured Prompt for Agentâ–Ľ
Please help me install this Agent Skill.
Skill: context-compression
Source: https://github.com/viktorbezdek/skillstack/tree/main/context-compression/skills/context-compression
Command: npx skills add https://github.com/viktorbezdek/skillstack --skill context-compression-viktorbezdek

SYSTEM DOCUMENTATION & REQUIREMENTS

đź’ˇ This Skill includes references (resource) components.

What problem does it solve?

Long‑running AI sessions quickly exceed the model's context window, causing loss of crucial information, increased token usage, and the need to re‑fetch data. This Skill provides strategies to shrink conversation history while preserving the most important technical details.

Core Features & Use Cases

  • Anchored Iterative Summarization: Incrementally summarize new content into structured sections (intent, file changes, decisions, next steps) to maintain a reliable artifact trail.
  • Opaque Compression: Produce ultra‑compact representations when maximum token saving is required, accepting reduced interpretability.
  • Regenerative Full Summary: Generate complete structured summaries at task boundaries for clear readability.
  • Trigger Strategies: Fixed‑threshold, sliding‑window, importance‑based, and task‑boundary triggers let you balance early compression with information retention.
  • Evaluation Framework: Probe‑based tests (recall, artifact, continuation, decision) assess compression quality against tokens‑per‑task metrics.

Quick Start

Ask the assistant to compress the conversation by saying: “Compress the context now using anchored iterative summarization.”

Frequently Asked Questions about context-compression

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

FAQPage Schema
How do I compress LLM context to stay within token limits during long coding sessions?â–Ľ

To compress LLM context during long coding sessions, apply anchored iterative summarization to incrementally summarize conversation history into structured sections like intent, file changes, and decisions, preserving essential technical details while reducing token usage.

What is the best way to reduce token usage in LLM debugging tasks without losing crucial information?â–Ľ

The best way to reduce token usage without losing crucial information is using importance-based or task-boundary triggers to compress conversation history, applying regenerative full summaries at task boundaries to maintain a reliable artifact trail and clear readability.

Can I use opaque compression for maximum token savings when an LLM context window is exceeded?â–Ľ

Yes, you can use opaque compression to produce ultra-compact representations for maximum token savings when the LLM context window is exceeded, though this approach accepts reduced interpretability in exchange for shrinking the conversation history.

How does anchored iterative summarization track artifacts in LLM conversations?â–Ľ

Anchored iterative summarization tracks artifacts by incrementally summarizing new content into structured sections including intent, file changes, decisions, and next steps, maintaining a reliable artifact trail throughout long-running AI sessions.

What trigger strategies can balance early context compression with information retention?â–Ľ

Fixed-threshold, sliding-window, importance-based, and task-boundary trigger strategies balance early context compression with information retention, allowing you to control when LLM conversation history is summarized based on token limits or workflow milestones.

How do I evaluate LLM summarization quality against tokens-per-task metrics?â–Ľ

You evaluate LLM summarization quality using probe-based tests including recall, artifact, continuation, and decision probes, which assess compression quality against tokens-per-task metrics to ensure essential details are preserved during context compression.