clawpressor

Compress OpenClaw session context by summarizing older messages with Sumy LexRank.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/wjlmrzd/OpenClaw-Wren --skill clawpressor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clawpressor
Source: https://github.com/wjlmrzd/OpenClaw-Wren/tree/main/skills/clawpressor
Command: npx skills add https://github.com/wjlmrzd/OpenClaw-Wren --skill clawpressor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sumy, nltk, google-auth, google-api-python-client, and includes scripts (resource) components.

What problem does it solve?

This skill reduces OpenClaw session size and token consumption by compressing older conversation history into concise summaries, preserving immediate context while restoring performance and lowering API costs.

Core Features & Use Cases

  • Preserves the most recent messages (default: 5) and summarizes older messages using NLP (Sumy LexRank) to produce a single compact system message.
  • Creates a .backup before applying changes, supports restore, logs compression statistics locally, and can optionally update a Google Sheet for tracking.
  • Use case: Run periodically or when sessions exceed size thresholds to prevent slowdowns, reduce token billing, and extend session lifetime without losing essential context.

Quick Start

Run the compressor in dry-run mode to preview changes by executing python3 skills/clawpressor/scripts/compress.py --dry-run.

Frequently Asked Questions about clawpressor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce token usage in OpenClaw session files?

Sumy LexRank summarizes older conversation history by applying NLP extraction to identify key sentences. It compacts previous messages into a single system message while preserving recent context, with a truncation fallback for safety.

Can I preview session compression changes before applying them?

Yes, you can preview session compression changes by running the compressor in dry-run mode. Execute the Python script with the --dry-run flag to review how the context will be compacted before modifying the actual session file.

Does compressing conversation history create backups of the original session?

Compressing conversation history creates a .backup file before applying any changes. This ensures the original session data is preserved, allowing you to restore the full context if the summarized output is insufficient for your needs.

When should I compress OpenClaw session context?

You should compress OpenClaw session context when sessions approach size limits, cause slow responses, or trigger high API costs. Running compression periodically extends session lifetime without losing essential context.

What are the limitations of using NLP summarization for session token optimization?

A limitation of NLP summarization for token optimization is potential context loss in summarized segments. While recent messages are preserved intact, older details are compressed into a general summary, which may omit specific historical nuances.