Prompt Compressor for Openclaw

A specialized skill that minimizes LLM token consumption by enforcing compressed response and memory patterns through SOUL.md instructions.

ckpxgfnksd-max
v0.2.0
Mar 14, 2026
1
945
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install prompt-token-saver

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 prompt-token-saver 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 Prompt Compressor?

The Prompt Compressor is a high-impact utility within the ecosystem of Openclaw Skills designed to significantly reduce operational costs. It functions by teaching the AI agent to adopt a high-density communication style, eliminating linguistic filler, hedging, and unnecessary narrative elements. By optimizing how the agent writes to memory and generates summaries, this skill ensures that context windows are preserved for longer periods, making your development workflows more sustainable.

This skill is particularly effective because the savings compound over time. As the agent produces compressed responses, those responses lead to smaller memory logs and more concise compaction summaries. This cycle reduces the total number of tokens processed on every subsequent turn without requiring external dependencies or complex hooks.

Prompt Compressor Use Cases

  • Reducing API expenditure and total token usage during extended coding or research sessions.
  • Optimizing agent memory logs to delay context window saturation in large projects.
  • Cleaning up conversational fluff from AI responses to focus strictly on actionable data.
  • Compressing manual prompts to ensure high-density information transfer to the LLM.

How Prompt Compressor Works

  1. The skill identifies the appropriate SOUL.md configuration file in either the global or workspace directory.
  2. It appends a specialized instruction set that modifies the agent's core behavioral persona.
  3. The agent is trained to lead with answers and strip away greetings, sign-offs, and filler words like 'basically' or 'actually'.
  4. All internal logging, including MEMORY.md and daily logs, is shifted to a 'one fact per line' format.
  5. During pre-compaction flushes, the agent prioritizes factual density over paragraph-based descriptions to save tokens.

Prompt Compressor Setup

To integrate this into your collection of Openclaw Skills, append the configuration snippet to your SOUL.md file:

cat {baseDir}/soul-snippet.md >> ~/.openclaw/SOUL.md

If you prefer to apply it only to a specific workspace, use:

cat {baseDir}/soul-snippet.md >> <workspace>/SOUL.md

After installation, you must start a new session by running the /new command to ensure the updated instructions are loaded into the agent's context.

Prompt Compressor Data Schema & Taxonomy

The Prompt Compressor organizes data by enforcing a strict taxonomy on internal agent files:

File Type Organization Strategy
MEMORY.md Strictly one fact per line; removal of narrative prose.
Daily Logs Decisions-only format; removes discussion and deliberation details.
Compaction Summaries Fact-based data points; replaces descriptive paragraphs.
Prompt Manuals Explicit rules for removing greetings, hedging, and padding.

Prompt Compressor Advanced Features

  • Compounding Token Savings: Every turn generates less history, making the entire session cheaper over time.
  • Intelligent Preservation: Automatically detects and preserves code blocks, URLs, quoted strings, and file paths during compression.
  • Linguistic Normalization: Converts verbose phrases (e.g., 'due to the fact that') into concise equivalents ('because').
  • Zero-Hook Architecture: Works via SOUL.md instructions, ensuring compatibility with all versions of the agent environment without extra processes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*