← 返回
未分类 Key 中文

Caveman Input Compression

Compress workspace bootstrap files into caveman-speak to reduce input tokens on every session load. Creates .original.md backups before overwriting.
将工作区引导文件压缩为简化语言以减少每次会话加载时的输入token,覆盖前会自动创建.original.md备份
ether-btc
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 423
下载
💾 2
安装
1
版本
#latest

概述

Caveman Input Compression Skill

Identity

Compress natural language workspace files into caveman-speak (~45% fewer input tokens). Creates .original.md backup before overwriting.

Supported Files

Always safe to compress:

  • SOUL.md
  • IDENTITY.md
  • USER.md

Feature-flagged (requires env var set):

  • AGENTS.md 🔒 (CAVEMAN_COMPRESS_AGENTS=1)
  • HEARTBEAT.md 🔒 (CAVEMAN_COMPRESS_HEARTBEAT=1)
  • MEMORY.md 🔒 (CAVEMAN_COMPRESS_MEMORY=1)

Security

  • No shell=True in subprocess calls
  • No user content as shell arguments
  • Files >500KB rejected
  • .original.md backup created before overwrite
  • Aborts if backup already exists (prevents accidental overwrite)

API Fallback Chain

Models tried in order:

  1. claude CLI (desktop auth) - Primary
  2. MiniMax (OpenAI-compatible) - Requires MINIMAX_BASE_URL + MINIMAX_API_KEY
  3. DeepSeek (OpenAI-compatible) - Requires DEEPSEEK_API_KEY

Uses subprocess + curl, no OpenAI SDK required.

Usage

# Compress a specific file
python3 -m skills.caveman_compress.scripts.compress /home/pi/.openclaw/workspace/SOUL.md

# Dry run (no write, just preview)
python3 -m skills.caveman_compress.scripts.compress --dry-run /home/pi/.openclaw/workspace/SOUL.md

# Feature flags (environment variables)
CAVEMAN_COMPRESS_AGENTS=1 /home/pi/.openclaw/workspace/scripts/caveman-enable.sh

Model Override

Set COMPRESSION_MODEL env var to use specific model:

COMPRESSION_MODEL=deepseek32 python3 -m skills.caveman_compress.scripts.compress SOUL.md

Default: deepseek32 (cheap, fast)

References

  • Upstream: https://github.com/JuliusBrussee/caveman
  • Paper: arXiv 2604.00025 — "Brevity Constraints Reverse Performance Hierarchies"
  • Project: memory/projects/caveman-token-reducer/

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 12:27 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Correlation Memory Search

ether-btc
OpenClaw 的关联感知记忆搜索插件——在查询记忆时自动检索相关决策上下文。零外部依赖。
★ 0 📥 370

Exec Truncate

ether-btc
AI代理工具,用于压缩/执行shell命令并提供领域感知的输出截断。适用于需要压缩exec工具输出或运行gi...
★ 0 📥 343

OpenClaw Config Safety v2

ether-btc
安全地验证、规范化、导出和导入 openclaw.json 配置文件,自动备份并在应用更改或升级前进行模式校验。
★ 0 📥 307