How to Switch Caveman Intensity Levels: A Complete Guide to Text Compression Modes

You switch Caveman intensity levels by issuing the /caveman <level> command in a Claude or Opencode session, where valid levels include lite, full (default), ultra, wenyan-lite, wenyan-full, and wenyan-ultra, with the system persisting your choice in a hidden .caveman-active flag file.

The Caveman project by JuliusBrussee is a text compression system that allows users to control how aggressively it condenses prose through six distinct intensity levels. Switching between these modes is handled via a simple slash command that updates an internal flag file, enabling persistent configuration across your session. Understanding how to switch Caveman intensity levels lets you fine-tune the balance between readability and conciseness according to your specific needs.

Available Intensity Levels

Caveman ships with six predefined intensity levels defined in skills/caveman/SKILL.md. Each level determines how aggressively the system compresses its output:

  • lite – Minimal compression, preserving most of the original sentence structure
  • full – The default mode, applying standard compression rules as documented in src/rules/caveman-openclaw-bootstrap.md
  • ultra – Maximum compression, condensing prose to the shortest possible form
  • wenyan-lite – Classical Chinese-inspired compression with minimal application
  • wenyan-full – Standard classical Chinese compression
  • wenyan-ultra – Full classical Chinese compression with maximum density

These levels are stored in the VALID_MODES array within src/hooks/caveman-config.js, which the system uses to validate incoming mode requests.

How to Switch Intensity Levels

Using the /caveman Command

To switch Caveman intensity levels during a session, type the slash command followed by your desired level:

/caveman lite      → activates “lite” mode (least aggressive compression)
/caveman ultra     → activates “ultra” mode (most aggressive compression)
/caveman wenyan-full → activates the classical Chinese “wenyan‑full” mode

The command metadata in commands/caveman.toml defines this interface for the CLI and Opencode UI. When executed, the system immediately applies the new ruleset to all subsequent responses.

Validating the Current Level

After switching, Caveman writes the selected intensity to a hidden flag file named .<caveman-active> (typically .caveman-active in your working directory). To verify which mode is currently active, inspect this file:

cat .caveman-active
#=> full   (or lite, ultra, etc.)

The readFlag utility in src/hooks/caveman-config.js performs this lookup automatically to determine which compression rules to apply.

How Mode Switching Works Under the Hood

When you issue a /caveman command, the src/hooks/caveman-mode-tracker.js hook intercepts the prompt and processes the intensity change. The core logic validates the requested level against VALID_MODES and persists the valid choice:

if (prompt.startsWith('/caveman')) {
  const parts = prompt.trim().split(/\s+/);
  const level = parts[1] || getDefaultMode();   // fall back to default “full”
  if (!VALID_MODES.includes(level)) {
    // ignore or report unknown level
  } else {
    await safeWriteFlag(flagPath, level);       // persist the new intensity
    await recordModeChange(level);              // optional logging
  }
}

The safeWriteFlag function from src/hooks/caveman-config.js handles writing to the .caveman-active file, ensuring atomic updates and preventing corruption during concurrent access. If you omit the level parameter (e.g., typing just /caveman), the system defaults to full as specified in the bootstrap ruleset.

Resetting to Normal Mode

To disable Caveman compression and return to normal prose, you have two options:

Method 1: Command-based reset

stop caveman

Method 2: Manual file deletion

rm .caveman-active

Removing the flag file causes the system to revert to standard output mode, effectively disabling all compression rules until the next /caveman command is issued.

Summary

Frequently Asked Questions

What are the valid Caveman intensity levels?

The valid intensity levels are lite, full, ultra, wenyan-lite, wenyan-full, and wenyan-ultra. These are defined in the skill description file skills/caveman/SKILL.md and validated against the VALID_MODES array in src/hooks/caveman-config.js. Each level corresponds to a specific compression aggressiveness, ranging from minimal (lite) to maximum (ultra).

How do I check which intensity level is currently active?

Inspect the hidden flag file .caveman-active in your working directory using the command cat .caveman-active. This file contains the string name of the current level (e.g., full or ultra). The system reads this file via the readFlag utility to determine which compression rules to apply to subsequent output.

What is the default Caveman intensity level?

The default intensity level is full. This default is specified in the bootstrap ruleset located at src/rules/caveman-openclaw-bootstrap.md and is used when no specific level is provided or when the flag file is missing. The getDefaultMode() function in the mode tracker returns this value when parsing incomplete /caveman commands.

How do I reset Caveman to normal mode?

You can reset Caveman to normal, uncompressed prose by either typing stop caveman in your session or manually deleting the .caveman-active flag file using rm .caveman-active. Both methods remove the active mode flag, causing the system to bypass all compression rules and revert to standard text output.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →