claw-compactor
Claw Compactor is an open-source Python library/CLI that compresses LLM input text and workspace content using a 14-stage, content-aware “Fusion Pipeline.” It focuses on reversible compression (via marker-based rewind retrieval) and AST-aware code compression (tree-sitter when available), aiming to reduce token counts and estimated inference cost without using external LLM inference for the compression itself.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Appears to be a local/offline tool with no network authentication described. Reversible compression implies original content may be stored in a RewindStore; ensure it is protected appropriately (file permissions, retention controls). Optional dependencies (tiktoken, tree-sitter language packs) increase the dependency surface; no SBOM/CVE status provided in the provided data.
⚡ Reliability
Best When
You need local, offline, deterministic-ish token reduction for structured and code-heavy content (code/JSON/logs/diffs), and you want reversibility via markers for later retrieval.
Avoid When
You require a networked service with standardized REST/GraphQL contracts, or you need strong confidentiality controls beyond local handling (e.g., multi-tenant environments without sandboxing).
Use Cases
- • Compressing code, JSON, logs, diffs, and search results before sending to an LLM to fit context windows
- • Reversible prompt/context compression for agents that may need to retrieve original sections on demand
- • Preprocessing large workspaces for cost/latency reduction in LLM-driven workflows
- • AST-aware code minification/compression while preserving identifiers (where supported)
- • Deduplicating and folding repeated content across messages/workspace inputs
Not For
- • Protecting secrets or providing security guarantees for sensitive content (it’s a local compression tool, not an access-control system)
- • Replacing a model-driven summarizer for tasks requiring deep paraphrasing or new reasoning
- • High-assurance reversible storage/retention requirements without reviewing the RewindStore implementation
- • Production systems needing a hosted HTTP API with managed authentication and rate limiting
Interface
Authentication
No authentication mechanism is described because this appears to be a local/offline library and CLI.
Pricing
No hosted service pricing described; PyPI package install suggests self-hosted/local usage.
Agent Metadata
Known Gotchas
- ⚠ Reversibility depends on RewindStore/marker handling; agents must preserve marker IDs and have access to rewind retrieval in the same execution context/config.
- ⚠ Tree-sitter/token-count accuracy depend on optional extras; behavior and exact token estimates may differ without optional dependencies.
- ⚠ Because it’s content-aware, stage application can be skipped; agents should not assume all stages run for every input.
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for claw-compactor.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-30.