context-compression

Compress long agent conversations into structured summaries with artifact tracking.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/yeeehaooo/agent-kit --skill context-compression-yeeehaooo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-compression
Source: https://github.com/yeeehaooo/agent-kit/tree/main/.agent-skills/skills/context-compression
Command: npx skills add https://github.com/yeeehaooo/agent-kit --skill context-compression-yeeehaooo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Long-running agent conversations accumulate vast context, leading to token bloat and degraded performance. This skill provides structured, deterministic context compression that preserves essential information while dramatically reducing tokens per task.

Core Features & Use Cases

  • Anchored Iterative Summarization: Maintain a persistent, sectioned summary that merges new content into existing structure to prevent information drift.
  • Opaque Compression: Achieve very high token savings at the cost of interpretability for tasks with low fidelity requirements.
  • Regenerative Full Summary: Recompute detailed summaries on each compression cycle to ensure completeness when needed.
  • Explicit Artifact Tracking: Keep an artifact index of files read, modified, and created to mitigate silent information loss.

Quick Start

Use a three-phase approach: (1) capture session intent and current state, (2) compress by merging new content into structured sections, (3) on each subsequent compression, only integrate the newest span and preserve history.

Frequently Asked Questions about context-compression

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

FAQPage Schema
How do I compress long agent conversations to reduce token bloat?

To compress long agent conversations, apply anchored iterative summarization to merge new content into structured sections and preserve critical context while reducing tokens.

What is anchored iterative summarization for context compression?

Anchored iterative summarization is a context compression method that maintains a persistent, sectioned summary, merging new content into existing structures to prevent information drift.

How do I prevent silent information loss when summarizing large codebases?

Prevent silent information loss during large codebase summarization by using explicit artifact tracking to maintain an index of files read, modified, and created throughout the session.

Can I use opaque compression for tasks with low fidelity requirements?

Yes, you can use opaque compression to achieve very high token savings for low fidelity requirements, trading interpretability to reduce context size without losing critical meaning.

What is the best way to summarize debugging tasks without exceeding token limits?

The best way to summarize debugging tasks within token limits is a three-phase approach: capture session intent, compress by merging content into structured sections, then integrate only new spans.

When should I not use regenerative full summary for context compression?

Avoid regenerative full summary when low fidelity is acceptable or token limits are strict, because recomputing detailed summaries on each cycle is resource-intensive and reduces token savings.