Install
openclaw skills install compressCompress text semantically with iterative validation, anchor checksums, and verified information preservation.
openclaw skills install compressThis is SEMANTIC compression, not bit-perfect lossless.
1. Compress original O → compressed C
2. Extract anchors from O (entities, numbers, dates)
3. Reconstruct C → R (without seeing O)
4. Verify: anchors match + semantic diff
5. If mismatch → refine C with missing info
6. Repeat until validated (max 3 iterations)
Convergence = verified. No convergence after 3 rounds = level too aggressive.
| Task | Load |
|---|---|
| Compression levels (L1-L4) | levels.md |
| Validation algorithm details | validation.md |
| Format-specific strategies | formats.md |
| Token budgeting and metrics | metrics.md |
| Level | Ratio | Reliability | Use Case |
|---|---|---|---|
| L1 | ~0.8x | ✅ High | Production, human-readable |
| L2 | ~0.5x | ✅ Good | System prompts, repeated use |
| L3 | ~0.3x | ⚠️ Moderate | Experimental, review output |
| L4 | ~0.15x | ⚠️ Low | Research only, expect losses |
Before compression, extract critical facts:
[ANCHORS: 3 people, $42,000, 2024-03-15, "Project Alpha"]
Reconstruction MUST reproduce these exactly. If anchors mismatch → compression failed.
Each compression costs 3-4 LLM calls. Break-even calculation:
break_even_retrievals = compression_tokens / saved_tokens_per_use
Only cost-effective if: You'll retrieve the compressed content 6-8+ times.
For one-time use → just use the original text.