Dev & Engineering

Context Compression Strategies

Compress long-running agent sessions while preserving files, decisions, risks, and next actions.

50/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 18k
Last updated
16d ago
License
MIT
context-compressionconversation-summarizationtoken-optimizationhandoff-summaries
+2artifact-trackingagent-evaluation

What does this skill do, and when should you use it?

This skill is for agent sessions, codebases, and tool trajectories that outgrow the available context window. It recommends anchored iterative summarization, opaque compression, or regenerative full summaries according to session characteristics. Its central objective is minimizing total tokens per completed task, including the cost of re-fetching information lost during compression. The guidance emphasizes durable artifact tracking, structured summary sections, strategic triggers, probe-based evaluation, and six quality dimensions.

It instructs agents to turn truncated session history into structured summaries covering intent, file changes, decisions, current state, and next steps. Later cycles should summarize only newly truncated content, merge it into the existing summary, and deduplicate by file path and decision identity. The skill also recommends tracking created, modified, and read-only files plus function names, variables, error messages, and error codes; evaluating retention with recall, artifact, continuation, and decision probes; and using a three-phase research, planning, and implementation workflow for large codebases.

Good fit
  • A software engineer debugging a long coding session where the agent may forget which files it changed.
  • A development team working on a codebase larger than the context window and needing a compact implementation specification.
  • An agent engineer designing durable handoff summaries that preserve rationale, identifiers, risks, and next actions.
  • A researcher building a compression evaluation framework that tests factual retention and task continuity with probes.

How do you install this skill?

Before you use it
  • The core evaluator's LLM judge remains a demonstration stub and should not be considered production-ready.
  • Regex extraction may omit or misidentify errors, files, decisions, and next steps; real-session regression testing is still needed.
  • The cited benchmark and external research results lack sufficient independent evidence in the supplied material.
  • Handling boundaries for sensitive conversation content, credentials, privacy data, and persisted summaries are unspecified.

The repository distributes skills as directories. Copy skills/context-compression into a project skill directory, for example: mkdir -p .codex/skills && cp -R skills/context-compression .codex/skills/. It may also be copied to .claude/skills/ or .agents/skills/. The README also documents Claude Code commands for installing the full plugin collection, but those install multiple skills rather than this skill alone.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/skills/context-compression" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Compress this coding session while preserving intent, full paths of created and modified files, function names, error messages, decisions, current test status, and next steps.

Load the directory in an Agent Skills-compatible client and invoke it for a long session or under context pressure, for example: “Compress this coding session while preserving intent, full paths of created and modified files, function names, error messages, decisions, current test status, and next steps.” For long-running coding work with artifact tracking, follow the recommended combination of structured summaries and sliding-window triggers.

What are this skill's strengths and limitations?

Pros
  • Clearly distinguishes three compression approaches and their suitable session profiles.
  • Treats exact file paths, function names, error codes, and decision rationale as first-class information.
  • Provides probe-based evaluation and a six-dimension quality framework.
  • Includes a practical research, planning, and implementation workflow for large codebases.
Limitations
  • This is instructional SKILL.md content, not a runnable compression implementation.
  • The reported compression ratios and quality scores are explicitly source-specific benchmark figures, not universal guarantees.
  • Faulty or overly aggressive summaries can still lose identifiers, early constraints, and code details.
  • The source does not describe an independent test suite or platform-specific validation for this skill.

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
Context Compression Strategies this page 50 · Use with care ★ 18k 16d ago MIT
LeanCTX — Local Context Intelligence Layer 61 · Recommended ★ 3.9k 14d ago Apache-2.0
LeanCTX Local Context Control 59 · Recommended ★ 3.9k 14d ago Apache-2.0
Latent Briefing 55 · Use with care ★ 18k 16d ago MIT
Agent Evaluation Methods 46 · Use with care ★ 18k 16d ago MIT

The skill compares anchored iterative summarization, opaque compression, and regenerative full summaries. It also distinguishes its scope from the collection’s context-optimization, context-degradation, filesystem-context, and memory-systems skills.

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Use with care
50/ 100 5-point scale 2.5 / 5
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
1Trust12 / 25 · 2.4/5

The skill mainly provides compression, summarization, and evaluation guidance, with no external side effects, credential handling, or exfiltration logic; no red-line risk is visible. However, sensitive-data handling, user confirmation, permission isolation, rollback, and data-flow disclosure are not specified, so safety-governance points are deducted.

2Reliability8 / 20 · 2.0/5

The instructions are coherent and include scripts, references, and tests for heuristic scoring behavior. However, the core LLM judge is explicitly a stub, extraction relies on fragile regexes, and production tokenization, API integration, and abnormal-path handling are incomplete; static evidence therefore keeps this below 10.

3Adaptability10 / 15 · 3.3/5

Activation conditions, neighboring non-fit skills, three compression strategies, and scenario guidance are clearly described and platform-agnostic. Input/output contracts, precise trigger boundaries, Chinese-language support, and mainland-China reachability are insufficiently documented, warranting deductions.

4Convention10 / 15 · 3.3/5

The skill has frontmatter, layered sections, examples, gotchas, reference pointers, an MIT license, and creation/update/version metadata. Maintenance ownership, update path, changelog, and dependency-install notes are incomplete, while some benchmark and research claims are not independently verifiable from the supplied material.

5Effectiveness6 / 15 · 2.0/5

It offers directly useful guidance and code scaffolding for compression strategy, artifact tracking, probe evaluation, and structured summaries. Yet the production evaluator is unfinished, regex extraction is limited, and representative outputs are not statically verified; substantial implementation and review remain necessary, so the static cap applies.

6Verifiability4 / 10 · 2.0/5

Auditable scripts, tests, and CI-related evidence are present, with tests covering two heuristic-scoring behaviors. But there is no complete executable coverage of the skill's key paths or independent third-party reproduction evidence; benchmark figures and external references remain insufficiently verified claims.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 20, 2026 Reviewed revision c578e85e40fe Review evidence[1][2][3][4][5][6][7][8][9][10][11]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Does it require a paid service?
The source does not state an additional cost or list paid dependencies; it primarily provides strategy and evaluation guidance.
Does it automatically edit files or call external tools?
No. The source describes summary structures, artifact tracking, and evaluation methods, but does not provide scripts or tool calls that execute them automatically.
When should it not be used?
It is not intended for general token-efficiency tactics, diagnosing the cause of long-context failure, writing raw logs without summarization, or designing long-term semantic memory across sessions.
How should compression quality be checked?
Use probes about the original error, modified files, next steps, and key decisions, while covering all six evaluation dimensions.

More skills from this repository

All from muratcankoylan/Agent-Skills-for-Context-Engineering

Dev & Engineering

Latent Briefing

Share task-relevant orchestrator state with workers through task-guided KV-cache compaction when the inference runtime is controllable.

★ 18k FS 55 Use with care 16d ago
Dev & Engineering

Agent Evaluation Methods

Build repeatable evaluation, regression detection, and quality gates for agent pipelines.

★ 18k FS 46 Use with care 16d ago
Dev & Engineering

Context Engineering for Production Agents

A structured guide to designing, optimizing, and evaluating production agent systems with reliable context management.

★ 18k FS 44 Not recommended 16d ago
Dev & Engineering

Context Engineering Fundamentals

Understand and shape reliable agent context through attention budgets, context-window mechanics, and signal-density principles.

★ 18k FS 55 Use with care 16d ago
Dev & Engineering

Filesystem Context Engineering

Move large, durable, or shared agent context into files and retrieve it selectively when needed.

★ 18k FS 45 Not recommended 16d ago
Dev & Engineering

Context Efficiency Optimizer

Reduce context cost with caching, masking, compaction, and partitioning while preserving answer quality.

★ 18k FS 44 Not recommended 16d ago
Dev & Engineering

Long-Horizon Prompting

Designs auditable launch briefs for autonomous agents and parallel multi-agent work on difficult, long-running tasks.

★ 18k FS 57 Use with care 16d ago
Dev & Engineering

Multi-Agent Architecture Patterns

Design multi-agent systems with context isolation, explicit handoffs, coordinated execution, and controlled failure handling.

★ 18k FS 55 Use with care 16d ago
Dev & Engineering

Persistent Semantic Memory Design

Design durable, retrievable agent memory that scales from simple files to temporal knowledge graphs.

★ 18k FS 53 Use with care 16d ago
Dev & Engineering

Context Degradation Diagnosis

Identify and mitigate lost attention, poisoning, distraction, confusion, and conflict in long agent contexts.

★ 18k FS 51 Use with care 16d ago
Dev & Engineering

Reasoning Trace Optimizer

Diagnose context, tool, and instruction failures by analyzing agent traces and iteratively improving prompts.

★ 18k FS 38 Not recommended 16d ago
Dev & Engineering

Self-Improvement Loops

Evolve agent harnesses, workflows, and context mechanisms under bounded, evidence-based evaluation.

★ 18k FS 58 Recommended 16d ago
Dev & Engineering

Advanced LLM Evaluation

Build auditable, calibrated LLM-output evaluations with explicit rubrics, confidence scoring, and bias controls.

★ 18k FS 56 Use with care 16d ago
Dev & Engineering

Project Development Methodology

Decide whether an LLM fits the job, then design a staged agent pipeline with predictable parsing, iteration, and cost control.

★ 18k FS 50 Use with care 16d ago
Dev & Engineering

BDI Mental State Modeling

Turn RDF context into explainable belief, desire, and intention chains.

★ 18k FS 49 Use with care 16d ago
Dev & Engineering

Autonomous Agent Harness

Designs autonomous agent loops that remain controlled, recoverable, and auditable.

★ 18k FS 49 Use with care 16d ago
Dev & Engineering

Agent Skill Blueprint

A reusable structure for authoring well-scoped context-engineering skills.

★ 18k FS 40 Not recommended 16d ago
Productivity & Collaboration

Digital Brain Personal OS

Manage content, relationships, knowledge, and goals through structured files and AI.

★ 18k FS 38 Not recommended 16d ago
Dev & Engineering

Agent Tool Design Guide

Design tool interfaces agents can route, call, and recover from reliably.

★ 18k FS 51 Use with care 16d ago
Dev & Engineering

Rigorous Research Agent

A validation, recovery, and source-tracking protocol for multi-step research.

★ 18k FS 45 Not recommended 16d ago

Related skills