An automated session management tool that optimizes token consumption by compacting early message history into concise, high-density summaries.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install session-compactor
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install session-compactor using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Session Compactor is a specialized utility designed to manage long-running conversations with AI agents. As dialogues grow, they consume significant portions of the context window and increase operational costs. This skill addresses these challenges by monitoring token counts and programmatically replacing older messages with structured summaries. It ensures that the agent retains critical context, tool execution history, and key facts while freeing up space for new interactions. By integrating Session Compactor into your suite of Openclaw Skills, you can maintain high-performance AI workflows that remain cost-effective and contextually aware over extended periods of time.
To enable this skill, update your openclaw.config.json configuration file:
{
"skills": {
"session-compactor": {
"enabled": true,
"maxTokens": 3000,
"minMessagesToKeep": 5,
"autoCompact": true
}
}
}
To trigger a manual session compression via the CLI, use the following command:
openclaw tools call compact_session '{"force": true}'
The skill organizes session data through the following parameters and metadata taxonomy:
| Parameter | Type | Default | Description |
|---|---|---|---|
maxTokens |
number | 3000 | The token threshold that triggers automatic compression. |
minMessagesToKeep |
number | 5 | The minimum number of recent messages to preserve in full detail. |
autoCompact |
boolean | true | Enables or disables background compression on session updates. |
force |
boolean | false | Allows manual override to compact sessions regardless of token count. |
Loading
A professional evaluation tool for tennis enthusiasts to score and compare global travel destinations based on court quality, travel costs, and climate.

A comprehensive image generation skill for Openclaw Skills that automates Midjourney rendering, 4K upscaling, and atmospheric scene transformations.

A unified interface for AI agents to access real-time probabilities, trading volumes, and historical data from major prediction markets like Polymarket and Kalshi.

An AI-powered skill that transforms city names into interactive, three-chapter gamified travel narratives with real-world booking links.

An AI-powered content engine for generating professional, data-backed Zhihu answers optimized for authority and lead generation.

An intelligent AI agent skill that automates the complex process of selecting the perfect Maldives resort based on user-specific travel preferences and budget.








































