context-compression

Summarize long-running agent sessions while tracking modified files and decisions.

17.7k|1.5k|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-compression-muratcankoylan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-compression
Source: https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/tree/main/skills/context-compression
Command: npx skills add https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-compression-muratcankoylan

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Preserving essential context for long-running agent sessions while minimizing token usage through anchored iterative summarization and structured memory management.

Core Features & Use Cases

  • Anchored iterative summarization: Incrementally merge new context into an existing structured summary to prevent information drift.
  • Structured artifact tracking: Preserve a discoverable trail of modified and accessed files, decisions, and state between compression cycles.
  • Production-grade compression workflows: Balance token savings with reconstruction fidelity, enabling scalable agents across long-running tasks.

Quick Start

In a live session, invoke the summarization routine on the current conversation and update the memory structure for next steps.

Frequently Asked Questions about context-compression

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

FAQPage Schema
How do I reduce token usage in long-running LLM agent sessions?

To reduce token usage in long-running LLM agent sessions, apply anchored iterative summarization to incrementally merge new context into a structured summary, preventing information drift while preserving essential memory.

What is the best way to track file changes in agent memory without re-reading the history?

Tracking file changes in agent memory without re-reading history requires structured artifact tracking, which maintains a discoverable trail of modified files, decisions, and state between compression cycles.

How does iterative summarization prevent information drift in production agents?

Iterative summarization prevents information drift by incrementally merging new context into an existing structured summary rather than replacing it, balancing token savings with reconstruction fidelity for scalable agents.

Can I compress conversation context for agents without losing critical state?

You can compress conversation context without losing critical state by using production-grade compression workflows that balance token savings with reconstruction fidelity through anchored iterative summarization and structured memory management.

When should I use context compression for LLM agents?

Use context compression for LLM agents when conversations span many turns, memory remains critical, and file or document changes must be tracked efficiently without re-reading the entire history.