Memory Hygiene for Openclaw

A maintenance skill designed to audit, purge, and optimize Clawdbot's LanceDB vector memory for better performance and lower token costs.

dylanbaker24
v1.0.0
Jan 29, 2026
20
26.5k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install memory-hygiene

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 memory-hygiene 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 Memory Hygiene?

Memory Hygiene is a critical utility for Openclaw Skills users who want to maintain a lean and efficient AI agent. Over time, vector memory can become cluttered with junk memories like heartbeats or transient logs, leading to high token usage and irrelevant auto-recalls. This skill provides the tools and protocols necessary to audit existing memory, wipe bloated databases, and reseed essential facts.

By synthesizing the core value of intentional storage, Memory Hygiene ensures your agent remains focused on high-value data like project decisions, user preferences, and key architectural choices while ignoring transient noise. It is an essential component for long-term agent stability and cost-efficiency.

Memory Hygiene Use Cases

  • Reducing token waste caused by irrelevant or bloated vector memory recalls.
  • Resetting agent memory after a significant project pivot or workflow change.
  • Setting up automated monthly maintenance cycles to prevent long-term memory degradation.
  • Transitioning from high-noise auto-capture to intentional, high-value memory storage.

How Memory Hygiene Works

  1. Perform a manual audit using memory recall to identify low-value entries and junk data.
  2. Disable automatic capture in the configuration to prevent the continuous accumulation of transient information.
  3. Execute a complete memory wipe by removing the local LanceDB directory when storage becomes unmanageable.
  4. Reseed the clean database with essential facts, preferences, and decisions extracted from documentation or manual entry.
  5. Establish a cron job to automate this maintenance lifecycle on a recurring monthly basis.

Memory Hygiene Setup

To configure Memory Hygiene within the Openclaw Skills ecosystem, first disable autoCapture via gateway action=config.patch:

{
  "plugins": {
    "entries": {
      "memory-lancedb": {
        "config": {
          "autoCapture": false,
          "autoRecall": true
        }
      }
    }
  }
}

To perform a manual wipe of the memory, run the following command in your terminal followed by a gateway restart:

rm -rf ~/.clawdbot/memory/lancedb/
clawdbot gateway restart

Memory Hygiene Data Schema & Taxonomy

Memory Hygiene interacts with the LanceDB vector store and organizes data based on importance and category metadata. Entries are optimized when kept under 100 words.

Category Content Type Importance Score
preference Workflow, tools, and communication styles 0.8 - 1.0
fact Accounts, contacts, and credential locations 0.9 - 1.0
decision Project choices and architectural paths 0.7 - 0.9
lesson Retrospectives and optimized patterns 0.6 - 0.8

Memory Hygiene Advanced Features

  • Automated maintenance scheduling via integrated cron job actions.
  • Strategic reseeding protocols to restore high-value context after a database purge.
  • Granular control over memory importance levels (0.7 to 1.0) to prioritize specific data types.
  • Configuration overrides to toggle between auto-capture and manual intentional storage modes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*