claw-compactor

Compress OpenClaw workspace tokens with a six-layer deterministic pipeline.

2.2k|207|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/open-compress/claw-compactor --skill claw-compactor-open-compress
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claw-compactor
Source: https://github.com/open-compress/claw-compactor/tree/main
Command: npx skills add https://github.com/open-compress/claw-compactor --skill claw-compactor-open-compress

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Claw Compactor reduces token spend across OpenClaw workspaces by applying a deterministic, layered compression pipeline that preserves essential context and enables efficient memory usage.

Core Features & Use Cases

  • Six layers: Rule Engine, Dictionary Encoding, Observation Compression, RLE Patterns, Compressed Context Protocol, and Engram for real-time observational memory.
  • Supports reversible compression via Engram's hash-backed store and marker-based retrieval for safe long-term storage.
  • Applicable to code, JSON, logs, diffs, and prose contexts, enabling lightweight deployment in AI agents and developer tooling.

Quick Start

Run at session start to automatically compress workspace context and report token savings.

Frequently Asked Questions about claw-compactor

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

FAQPage Schema
How do I reduce token usage in LLM workspaces with deterministic compression?

Deterministic token compression reduces LLM workspace token usage by applying a six-layer pipeline targeting code, JSON, logs, and prose to preserve essential context while minimizing overhead.

What is the best way to compress AI agent context for long-term memory retrieval?

Compressing AI agent context for long-term memory is best handled via marker-based retrieval and hash-backed stores, enabling reversible memory through Engram for safe session-start savings.

Can I run partial token compression on specific workspace formats like logs and JSON?

Yes, the CLI supports partial runs to compress specific workspace formats like logs and JSON, allowing targeted token reduction across code, diffs, and prose contexts.

Does deterministic token compression work for both code and prose contexts?

Deterministic token compression works for both code and prose contexts by applying rule engine, dictionary encoding, and observation compression layers across diverse workspace formats.

When should I use reversible compression instead of standard workspace context reduction?

Reversible compression should be used when you need long-term memory storage, utilizing Engram's hash-backed store and marker-based retrieval to safely restore compressed session context.