Claude Skill
open-compress/claw-compactor
Open-source tool to compress LLM tokens & cut AI agent costs by up to 97%. 5-layer context compression for OpenClaw. Deterministic, no LLM needed. Save tokens, optimize prompts.
Overview
Repository
Install this Skill
pip install claw-compactorRegistry
pip install claw-compactorgit clone https://github.com/open-compress/claw-compactor.gitpip install -e .pip install tiktokenpip install tree-sitter-language-pack
Summary
Claw Compactor is a deterministic LLM token compression and reduction tool designed to cut AI agent token costs by up to 97%. It provides a 5-layer context compression solution specifically for OpenClaw workspaces, enabling token saving, prompt compression, and context window optimization without requiring an LLM.
🦞 LLM 令牌压缩与精简工具 —— 将AI智能体令牌成本降低高达97%。专为OpenClaw工作空间设计的5层上下文压缩方案。采用确定性算法,无需依赖LLM。实现令牌节省、提示词压缩与上下文窗口优化。
Key features
- Deterministic token compression (no LLM required)
- Up to 97% reduction in AI agent token costs
- 5-layer context compression for OpenClaw workspaces
- Optimizes context window and reduces prompt size
- Focus on token saving and cost reduction
Use cases
- Reducing operational costs for AI agents and Claude Skill
- Compressing prompts to fit within context limits
- Optimizing OpenClaw workspace memory usage
- Managing token budgets for large-scale AI deployments
- Improving efficiency of context-heavy AI applications
README excerpt
<!-- <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "SoftwareApplication", "name": "Claw Compactor", "description": "14-stage Fusion Pipeline for LLM token compression with reversible compression, AST-aware code analysis, and intelligent content routing", "applicationCategory": "DeveloperApplication", "operatingSystem": "Cross-platform", "softwareVersion": "7.0.0", "license": "https://opensource.org/licenses/MIT", "url": "https://github.com/open-compress/claw-compactor", "downloadUrl": "https://github.com/open-compress/claw-compactor", "author": { "@type": "Organization", "name": "OpenClaw", "url": "https://openclaw.ai" }, "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }, "keywords": "token compression, LLM, AI agent, fusion pipeline, reversible compression, AST code analysis, context window optimization" } </script> --> <div align="center"> # Claw Compactor ### 14-Stage Fusion Pipeline for LLM Token Compression  [](https://github.com/open-compress/claw-compactor/actions) [](https://codecov.io/gh/open-compress/claw-compactor) [](https://python.org) [](LICENSE) [](https://pypi.org/project/claw-compactor/) [](https://pypi.org/project/claw-compactor/) [![Stars](https://img.shields.i