← 返回 Skills 市场
ether-btc

Caveman Input Compression

作者 austrian_guy · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
85
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install caveman-compress
功能描述
Compress workspace bootstrap files into caveman-speak to reduce input tokens on every session load. Creates .original.md backups before overwriting.
使用说明 (SKILL.md)

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

安全使用建议
This skill is likely what it claims (a workspace markdown compressor) but has small inconsistencies and a few security-relevant behaviors you should be aware of: (1) the backup filename in code is '.md.original' whereas SKILL.md says '.original.md' — confirm where backups will land before running; (2) the implementation passes your file content and API keys to subprocess commands (claude CLI and curl) as command arguments, which can expose them to other local processes via the process list — prefer a dry-run or run in a sandbox first; (3) the claude path does not truncate input, so very large files could break the call; (4) SKILL.md's safety claims (no user content as shell arguments) are misleading. Before installing: review and test the code in a safe environment, run the --dry-run option, ensure you trust any remote base_url/DEEPSEEK endpoints you configure, and back up workspace files manually so you can recover if behavior differs from the documentation.
功能分析
Type: OpenClaw Skill Name: caveman-compress Version: 0.1.0 The skill compresses workspace files by sending their content to external LLM APIs (Claude, MiniMax, and DeepSeek) using subprocess calls to 'curl' and the 'claude' CLI. While it includes safety features such as path validation (restricting access to the ~/.openclaw/workspace directory), file size limits (500KB), and atomic backup creation, the inherent behavior of transmitting workspace data to third-party endpoints and handling API keys via environment variables in shell commands is high-risk. Additionally, a functional bug exists in scripts/compress.py where it attempts to call 'is_technically_intact' without importing it from scripts/validate.py, which would cause a runtime error.
能力评估
Purpose & Capability
Name/description match the code: it compresses markdown files under ~/.openclaw/workspace, creates a backup, and uses a model fallback chain (claude CLI → OpenAI-compatible endpoints → DeepSeek). The requested credentials (optional API keys) are proportional to this purpose.
Instruction Scope
SKILL.md claims 'No user content as shell arguments' and 'Creates .original.md backups', but the implementation: (1) sends user content to subprocess.run for the claude CLI and for curl's -d argument (content appears as command arguments), and (2) creates backups with a different suffix (code uses .md.original, SKILL.md says .original.md). The claude path does not truncate content, so very long files could exceed command-line argument limits. The code does limit content for OpenAI-compatible fallback to 10k chars, but not for claude.
Install Mechanism
No install spec (instruction-only install) and the package is just Python files included in the skill. Nothing is being downloaded or extracted from third-party URLs during install.
Credentials
No required env vars declared in registry, but the code optionally uses MINIMAX_BASE_URL, MINIMAX_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY, COMPRESSION_MODEL and feature flags like CAVEMAN_COMPRESS_MEMORY. These are reasonable for remote model access. However, API keys are passed as literal command arguments/headers to curl and appear on the subprocess command line (and therefore might be visible to other local processes), which is a sensitive handling detail the SKILL.md does not call out.
Persistence & Privilege
Skill is not always-enabled, does not request elevated system persistence, and does not modify other skills or system-wide settings. It operates as a one-shot on explicit paths.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install caveman-compress
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /caveman-compress 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of caveman-compress. - Compresses workspace bootstrap files into caveman-speak, reducing input tokens by ~45%. - Creates `.original.md` backup before overwriting files and aborts if backup exists. - Only compresses SOUL.md, IDENTITY.md, and USER.md by default; AGENTS.md, HEARTBEAT.md, and MEMORY.md require feature flags. - Files larger than 500KB are rejected for safety. - Supports multiple model backends (claude CLI, MiniMax, DeepSeek) using subprocess + curl. - Includes dry-run option and environment variable controls for model and file support.
元数据
Slug caveman-compress
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Caveman Input Compression 是什么?

Compress workspace bootstrap files into caveman-speak to reduce input tokens on every session load. Creates .original.md backups before overwriting. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 85 次。

如何安装 Caveman Input Compression?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install caveman-compress」即可一键安装,无需额外配置。

Caveman Input Compression 是免费的吗?

是的,Caveman Input Compression 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Caveman Input Compression 支持哪些平台?

Caveman Input Compression 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Caveman Input Compression?

由 austrian_guy(@ether-btc)开发并维护,当前版本 v0.1.0。

💬 留言讨论