context-compression

Compress long agent conversations into structured summaries with sections for intent and decisions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compresses long agent conversations and session histories into structured, compact representations while preserving essential signals such as facts, decisions, and file changes to minimize token usage.

Core Features & Use Cases

  • Anchored Iterative Summarization: maintain persistent summaries with explicit sections for intent, files modified, decisions, and next steps.
  • Structured Summary Output: generate actionable, sectioned reports that are easy to merge across compression cycles.
  • Evaluation & Guardrails: support probe-based evaluation of compression quality and artifact-trail awareness.

Quick Start

Summarize the current conversation into a structured snippet that captures intent, modified files, decisions, and 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 compress long agent conversations to save tokens?

Compress long agent conversations using anchored iterative summarization to condense session histories into structured, compact representations while preserving essential signals like facts, decisions, and file changes to minimize token usage.

What is anchored iterative summarization for agent memory?

Anchored iterative summarization for agent memory maintains persistent summaries with explicit sections for intent, files modified, decisions, and next steps to preserve critical signals in memory for continuity across compression cycles.

How do I summarize a debugging workflow without losing context?

Summarize a multi-turn debugging workflow without losing context by generating structured, sectioned reports that capture intent, modified files, decisions, and next steps while minimizing token usage.

Can I evaluate the quality of context compression for agent sessions?

Evaluate context compression quality for agent sessions using a lightweight evaluation framework with probe-based scoring and artifact-trail awareness to ensure critical signals are preserved during compression.

When do I need to compress context for large code exploration histories?

You need to compress context for large code exploration histories when sessions exceed context windows, requiring tokens-per-task optimized representations to maintain continuity without losing critical signals.