layered-history-compression-reuse

Community

Trim chat history with layered compression.

Authorliuyu520
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Reduces token usage and keeps conversations performant by applying layered history compression that preserves recent content and defensively manages older tool results.

Core Features & Use Cases

  • Layered tiering preserves recent turns verbatim, truncates middle-age tool results, and elides very old interactions.
  • Tool-pair safety runs after compression to repair orphaned tool_use/tool_result pairs and maintain API integrity.
  • Extensible architecture integrates with snipCompact, env gating, and SnipResult contracts for future tier additions.

Quick Start

Use this skill to apply layered history compression to an ongoing conversation by enabling the most recent content, truncating the middle, and eliding the oldest items while preserving tool-use pairs.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: layered-history-compression-reuse
Download link: https://github.com/liuyu520/cc_source/archive/main.zip#layered-history-compression-reuse

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.