context-compression

Compress long-running agent session history into structured, searchable summaries.

1|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/phonowell/mimikit --skill context-compression-phonowell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-compression
Source: https://github.com/phonowell/mimikit/tree/main/.agents/skills/context-engineering-collection/skills/context-compression
Command: npx skills add https://github.com/phonowell/mimikit --skill context-compression-phonowell

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Long-running AI agent sessions can accumulate context, causing token bloat and inefficiency. Context compression provides a disciplined approach to prune history while preserving critical decisions, file changes, and state for reliable continuation.

Core Features & Use Cases

  • Anchored iterative summarization with explicit sections to prevent information drift.
  • Support for multiple compression strategies (Anchored Iterative, Regenerative, Opaque) with trade-off guidance.
  • Built-in evaluation framework that uses probes to measure information preservation and task continuity.
  • Lightweight integration with a local state directory and on-demand references for deeper insight.

Quick Start

Provide a structured, anchored summary for a long-running coding session to compress context and preserve critical decisions and file changes.

Frequently Asked Questions about context-compression

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

FAQPage Schema
How do I compress context in long-running AI agent sessions?

Compress context in long-running AI agent sessions by applying anchored iterative summarization to prune history while preserving critical decisions, file changes, and state for reliable continuation.

What is anchored iterative summarization for token optimization?

Anchored iterative summarization is a context compression strategy that uses explicit sections to prevent information drift while reducing token bloat in persistent AI agent workflows.

What's the best way to preserve state when pruning history in persistent agent workflows?

The best way to preserve state is to compress history into structured, searchable summaries that retain critical decisions and file changes using an evaluation framework with probes to measure information preservation and task continuity.

Can I use different context compression strategies for debugging and design reviews?

Yes, you can use multiple context compression strategies including Anchored Iterative, Regenerative, and Opaque approaches, each with specific trade-off guidance for scenarios like debugging and design reviews.

How do I evaluate information preservation when compressing history into summaries?

Evaluate information preservation using a built-in evaluation framework that employs probes to measure how well critical decisions, file changes, and state are retained for task continuity.

Do I need specific dependencies to manage token bloat in persistent agent workflows?

No specific dependencies are required to manage token bloat; the context compression approach uses a local state directory and on-demand references with a SKILL.md frontmatter containing a name and description.