Skip to main content

Context Compression

Skill Verified Active

This skill should be used when the user asks to "compress context", "summarize conversation history", "implement compaction", "reduce token usage", or mentions context compression, structured summarization, tokens-per-task optimization, or long-running agent sessions exceeding context limits.

Purpose

To provide agents with effective methods for managing and reducing token usage in long-running sessions by intelligently compressing conversation history and evaluating the quality of compression.

Features

  • Strategies for context compression (Anchored Iterative, Opaque, Regenerative)
  • Guidance on optimizing tokens-per-task vs. tokens-per-request
  • Detailed explanation of artifact trail preservation
  • Methodologies for probe-based evaluation of compression quality
  • Implementation steps for structured summaries and compression triggers

Use Cases

  • When agent sessions exceed context window limits
  • Designing conversation summarization strategies
  • Debugging agents that 'forget' previous information
  • Optimizing token usage in long-running agent sessions

Non-Goals

  • Replacing prompt engineering entirely
  • Handling context compression for raw code blocks without summarization
  • Providing a generic text summarization tool outside of agent context engineering

Workflow

  1. Identify need for context compression due to session length or token limits.
  2. Select an appropriate compression strategy (Anchored Iterative, Opaque, Regenerative).
  3. Implement the chosen strategy, focusing on structured summaries and appropriate triggers.
  4. Evaluate compression quality using the provided probe-based framework.
  5. Monitor re-fetching frequency as a key quality signal.

Practices

  • Context Engineering
  • LLM Evaluation
  • Agent Design Patterns

Installation

First, add the marketplace

/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering
/plugin install Agent-Skills-for-Context-Engineering@context-engineering-marketplace

Quality Score

Verified
100 /100
Analyzed about 13 hours ago

Trust Signals

Last commitabout 1 month ago
Stars15.6k
LicenseMIT
Status
View Source

© 2025 SkillRepo · Find the right skill, skip the noise.