skills/olafgeibig/skills/lossless-claw-skill

lossless-claw-skill

SKILL.md

Lossless Claw Helper

Lossless Context Management plugin for OpenClaw, based on the LCM paper. It replaces OpenClaw's built-in sliding-window compaction with a DAG-based summarization system that preserves every message while keeping active context within model token limits.

What It Does

When a conversation grows beyond the model's context window, OpenClaw normally truncates older messages. LCM instead:

  1. Persists every message in a SQLite database, organized by conversation.
  2. Summarizes older message chunks using the configured LLM.
  3. Condenses summaries into higher-level nodes, forming a DAG.
  4. Assembles each turn from summaries plus recent raw messages.
  5. Exposes retrieval tools so agents can search and recall details from compacted history.

Nothing is lost: raw messages remain in the database, summaries link to source material, and agents can drill into compacted history.

Quick Start

Prerequisites

  • OpenClaw with plugin context engine support
  • Node.js 22+
  • An LLM provider configured in OpenClaw for summarization

Install the plugin

openclaw plugins install @martian-engineering/lossless-claw

If running from a local OpenClaw checkout:

pnpm openclaw plugins install @martian-engineering/lossless-claw

For local plugin development, link your working copy:

openclaw plugins install --link /path/to/lossless-claw

Configure OpenClaw

In most cases, installer setup is enough. If manual configuration is needed, set the context engine slot:

{
  "plugins": {
    "slots": {
      "contextEngine": "lossless-claw"
    }
  }
}

Restart OpenClaw after configuration changes.

Usage Overview

  • Use lcm_grep to search compacted history.
  • Use lcm_describe to inspect a specific summary or stored large file.
  • Use lcm_expand_query for deep recall when summaries omit required detail.
  • Use lcm-tui to inspect DAG/context state and run maintenance operations.

Detailed References

  • Configuration guide (including environment variables): ./reference/configuration.md
  • Architecture and internals: ./reference/architecture.md
  • Agent tools reference and patterns: ./reference/agent-tools.md
  • TUI reference and maintenance workflows: ./reference/tui.md
  • Optional FTS5 runtime enablement: ./reference/fts5.md
Weekly Installs
1
First Seen
4 days ago
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1