Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
- Rebranded from "OpenClaw Token Compressor" to "Claw Compactor" with version update to v6.0. - Project directory, command, and configuration file references updated for the new name. - Added a new banner image (assets/banner.png). - Minor text and credit updates throughout documentation.
What This Skill Does
Compresses AI agent workspace files, including memory, session transcripts, and sub-agent context, using 5 layered techniques: rule-based dedup, dictionary encoding, observation extraction, RLE patterns, and format optimization. All compression is deterministic and runs without LLM calls. Session transcripts compress ~97%; first-run savings typically reach 50%+.
All compression runs locally without LLM calls, so there is no additional API cost to reduce token spend.
When to use it
- Reducing token costs on long-running Claude agent sessions
- Compressing accumulated session transcripts before starting a new project
- Running weekly maintenance on AI agent memory files via cron
- Shrinking sub-agent context payloads before handoff
- Auditing workspace token usage before a billing cycle
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: compress my Claude agent workspace to cut token costs
- 1Run benchmark command to preview savings without modifying any files
- 2Execute full pipeline to apply all 5 compression layers in sequence
- 3Convert session JSONL transcripts to structured observation summaries
- 4Generate L0/L1/L2 tiered summaries for progressive context loading
- 5Save codebook to memory/.codebook.json for future decompression
Workspace compressed 50%+ overall; session transcripts reduced ~97%; tiered summary files written to memory/