conv-compactor for Openclaw

A sophisticated multi-level conversation compression system that prevents context overflow by transforming chat history into structured summaries.

sinnzen
v1.0.1
Apr 1, 2026
0
761
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install conv-compactor

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 conv-compactor 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 conv-compactor?

conv-compactor is a specialized tool designed to solve the critical problem of context window exhaustion in AI agents. Instead of simply truncating older messages—which often leads to the loss of vital project history—this Openclaw Skills extension monitors token usage and condenses the conversation into high-fidelity, structured summaries. It ensures that the AI retains important decisions, full code snippets, and user feedback while freeing up space for new tasks.

By implementing a multi-tiered approach, conv-compactor allows for varying degrees of compression, ranging from shrinking massive tool outputs (Micro) to fully distilling an entire session (Full). It acts as a bridge between active short-term dialogue and long-term memory hierarchies, ensuring the agent remains sharp and responsive even during exceptionally long development sessions.

conv-compactor Use Cases

  • When conversation tokens exceed 80% of the safety threshold (approx. 87K tokens for standard 200K windows).
  • Handling massive tool outputs, such as grep results or large file reads that threaten to clog the context.
  • Manual context management using the /compact command to reset the workspace focus.
  • Preventing AI performance degradation or repetitive behavior caused by bloated history.

How conv-compactor Works

  1. The system continuously monitors the active token count against the specific safety threshold of the model (e.g., MiniMax, GPT-4o, or Claude).
  2. If a threshold is met or a command is issued, it identifies the compression level required: Micro, Auto, or Full.
  3. It groups conversation history into API rounds (User Prompt + Assistant Response + Tool Calls).
  4. The compression prompt extracts key technical points, decision logs, and full code blocks while redacting sensitive information like API keys.
  5. A structured summary marker is inserted into the chat, replacing the bulky raw history with a distilled version.
  6. The most recent 2-3 message rounds are preserved in their original form to maintain immediate conversational flow.

conv-compactor Setup

To integrate this skill into your agent workflow, ensure the following configuration is present in your Openclaw Skills environment:

# Standard trigger within your agent CLI
/compact --level auto

# Or manual trigger for specific contexts
/compact --scope session

Ensure that the compression prompt template is accessible to the agent in its system instructions.

conv-compactor Data Schema & Taxonomy

The skill organizes compressed data into a structured Markdown format for the agent to parse efficiently:

Section Description
Summary Overview 1-2 sentence description of the conversation theme.
Retained Content Count of compressed rounds and active files.
Key Technical Points Frameworks, languages, and technical concepts discussed.
Decisions & Feedback User preferences, corrections, and explicit design choices.
Pending Tasks Unresolved requests or 'To-Do' items.
Code Blocks Full function bodies and critical modifications.
Redaction Tags Placeholders like [REDACTED: api_key] for security.

conv-compactor Advanced Features

  • Multi-level compression logic (Micro, Auto, and Full) adapted to model-specific context limits.
  • Automated sensitive data redaction (PII, API keys, and credentials) during the summarization process.
  • Seamless integration with long-term memory hierarchies to archive distilled sessions into permanent storage.
  • Context-aware code retention that prioritizes complete function bodies over simple diffs.
  • Intelligent micro-compression for oversized individual tool results.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*