Claude Skill
open-compress/claw-compactor
开源工具,用于压缩 LLM 令牌并将 AI 智能体成本降低高达 97%。专为 OpenClaw 提供 5 层上下文压缩。采用确定性算法,无需 LLM。节省令牌,优化提示词。
概览
仓库信息
安装这个 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
项目简介
Claw Compactor 是一款确定性的 LLM 令牌压缩与精简工具,旨在将 AI 智能体令牌成本降低高达 97%。它专为 OpenClaw 工作空间设计,提供 5 层上下文压缩方案,无需依赖 LLM 即可实现令牌节省、提示词压缩和上下文窗口优化。
14-stage Fusion Pipeline for LLM token compression — reversible compression, AST-aware code analysis, intelligent content routing. Zero LLM inference cost. MIT licensed.
要点
- 确定性令牌压缩(无需依赖 LLM)
- AI 智能体令牌成本降低高达 97%
- 专为 OpenClaw 工作空间设计的 5 层上下文压缩
- 优化上下文窗口并减少提示词大小
- 专注于令牌节省与成本降低
使用场景
- 降低 AI 智能体及 Claude Skill 的运营成本
- 压缩提示词以适应上下文限制
- 优化 OpenClaw 工作空间内存使用
- 管理大规模 AI 部署的令牌预算
- 提升上下文密集型 AI 应用的效率
README 摘要
<!-- <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