Caveman Compress for Openclaw

A specialized token-optimization utility designed to compress natural language memory files into ultra-dense 'caveman' text to maximize LLM context windows without losing structural or technical substance.

liyafeichina
v1.0.0
Jun 10, 2026
0
507
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install file-compress-optimizer

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install file-compress-optimizer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Caveman Compress?

Caveman Compress is a purpose-built utility designed to mitigate the problem of context window bloat in AI coding workflows. It achieves this by aggressively stripping linguistic filler, articles, and conversational fluff from natural language memory files such as CLAUDE.md, lists of todos, and developer preferences, rewriting them into an ultra-dense, high-efficiency "caveman" format.

While conversational prose is compressed down to its absolute thematic essence, this skill strictly guarantees the complete integrity of vital technical items. Every single line of code, URL, file path, development command, and structural Markdown element remains untouched. By transforming bulky documentation into dense, high-signal instructions, this Openclaw Skills extension directly preserves valuable input tokens and lowers overall inference costs.

Caveman Compress Use Cases

  • Reducing token consumption in AI agent long-term memory logs and project scratchpads.
  • Condensing large CLAUDE.md guidelines or project instructions before a heavy coding session.
  • Freeing up vital LLM context window space when managing large, prose-heavy documentation alongside code.
  • Automating the compression of local text buffers, task files, and local developer preference sheets without losing underlying technical details.

How Caveman Compress Works

  1. Triggering the Routine: The developer initiates the skill manually via the command /caveman:compress <filepath> or by prompting the AI agent to condense a memory file.
  2. Context Resolution: The script locates its execution context within the designated skill directory to ensure all background scripts are fully accessible.
  3. Type Checking & Execution: The tool automatically determines the target file type without wasting tokens and invokes the core execution layer (python3 -m scripts <absolute_filepath>).
  4. Intelligent Compactor Integration: The file contents undergo compression based on rigorous semantic rules, aggressively targeting grammatical fillers while preserving code blocks.
  5. Validation and Error Isolation: The output undergoes automated validation. If validation fails, targeted fixes are processed over up to 2 retry attempts; if errors persist, the operation safely aborts to protect your work.
  6. Overwriting and Output: A human-readable backup is created at <filename>.original.md, and the primary file is overwritten with the newly optimized token-saving version.

Caveman Compress Setup

To integrate Caveman Compress into your ecosystem of Openclaw Skills, navigate to your local repository directory where the skill files are housed:

# Navigate to your agent skill suite directory
cd path/to/openclaw/skills/caveman_compress

# Compress your desired file safely via Python
python3 -m scripts /absolute/path/to/CLAUDE.md

Ensure that Python 3 is installed in your local environment and that the scripts/ module accompanies this skill file in the same directory layout.

Caveman Compress Data Schema & Taxonomy

Caveman Compress maintains data safety through strict file taxonomy boundaries and non-destructive overwrites.

File System Transformations

File Type Action Output Destination
Original Prose File (CLAUDE.md) Overwritten Compressed CLAUDE.md
Human-Readable Backup Generated CLAUDE.original.md

Target and Exclusion Boundaries

  • Allowed Extensions (Prose only): .md, .txt, .typ, .typst, .tex, and extensionless text assets.
  • Strictly Protected Extensions (Code/Configs): .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh.

Caveman Compress Advanced Features

  • Automated Verification Loop: Validates the structural schema after processing, employing targeted fixes instead of broad file recompression to keep token usage low.
  • Read-Only Code Zoning: Segments code fences and backtick expressions into immutable blocks, guaranteeing that syntax, parameters, and comments remain unmodified.
  • Linguistic Simplification Engine: Seamlessly switches long verbs for punchy synonyms and eliminates conversational hedging phrases while keeping list levels and table columns aligned.
  • Zero-Risk Safe Recovery Execution: Skips files matching the .original.md pattern automatically and aborts cleanly to safeguard data if errors are encountered.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*