Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aaaaqwq avatar

Memory Hygiene

  • 365 installs
  • 82 repo stars
  • Updated August 2, 2026
  • aaaaqwq/claude-code-skills

memory-hygiene is an agent skill that audits, wipes, and reseeds LanceDB vector memory for Clawdbot agents so stale auto-captured entries stop wasting tokens on irrelevant recalls.

About

memory-hygiene is an agent skill from aaaaqwq/AGI-Super-Team (forked from openclaw memory-hygiene) for keeping Clawdbot vector memory lean. It audits stored entries with memory_recall query="*" limit=50, wipes bloated LanceDB data via rm -rf ~/.clawdbot/memory/lancedb/, and reseeds intentional facts from MEMORY.md using memory_store with category preference, fact, or decision and importance 0.7–1.0. The skill disables autoCapture in the memory-lancedb plugin config—the main source of junk memories—while keeping autoRecall enabled, and documents a monthly cron schedule (0 4 1 * *) for automated maintenance. Developers reach for memory-hygiene when agent token usage spikes from irrelevant auto-recalls or vector memory fills with heartbeat noise and transient chat logs.

  • Stale memory pruning
  • Context deduplication rules
  • Retention policy enforcement
  • Contradiction reduction
  • Long-session accuracy upkeep

Memory Hygiene by the numbers

  • 365 all-time installs (skills.sh)
  • Ranked #2,062 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill memory-hygiene

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs365
repo stars82
Last updatedAugust 2, 2026
Repositoryaaaaqwq/claude-code-skills

How do you clean bloated agent vector memory?

Prune stale agent memories, deduplicate context, and enforce retention rules so long-running assistants stay accurate, fast, and free of contradictory recall.

Who is it for?

Engineers operating Clawdbot or LanceDB-backed agents whose vector memory is bloated with junk auto-captures driving high token recall costs.

Skip if: Teams using only Claude Code MEMORY.md files without a LanceDB vector memory plugin do not need this LanceDB-specific maintenance skill.

When should I use this skill?

Agent memory recall returns irrelevant entries, token usage spikes from auto-recall, or the developer sets up monthly vector memory maintenance.

What you get

Audited memory inventory, wiped LanceDB store, reseeded fact entries, and updated plugin config disabling autoCapture

  • Memory audit report
  • Cleaned LanceDB store
  • Updated plugin config and reseeded facts

By the numbers

  • Audits up to 50 memory entries per memory_recall query="*" call
  • Defines 3 memory_store categories: preference, fact, and decision
  • Monthly maintenance cron schedule: 0 4 1 * *

Files

SKILL.mdMarkdownGitHub ↗

Memory Hygiene

Keep vector memory lean. Prevent token waste from junk memories.

Quick Commands

Audit: Check what's in memory

memory_recall query="*" limit=50

Wipe: Clear all vector memory

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

Then restart gateway: clawdbot gateway restart

Reseed: After wipe, store key facts from MEMORY.md

memory_store text="<fact>" category="preference|fact|decision" importance=0.9

Config: Disable Auto-Capture

The main source of junk is autoCapture: true. Disable it:

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

Use gateway action=config.patch to apply.

What to Store (Intentionally)

✅ Store:

  • User preferences (tools, workflows, communication style)
  • Key decisions (project choices, architecture)
  • Important facts (accounts, credentials locations, contacts)
  • Lessons learned

❌ Never store:

  • Heartbeat status ("HEARTBEAT_OK", "No new messages")
  • Transient info (current time, temp states)
  • Raw message logs (already in files)
  • OAuth URLs or tokens

Monthly Maintenance Cron

Set up a monthly wipe + reseed:

cron action=add job={
  "name": "memory-maintenance",
  "schedule": "0 4 1 * *",
  "text": "Monthly memory maintenance: 1) Wipe ~/.clawdbot/memory/lancedb/ 2) Parse MEMORY.md 3) Store key facts to fresh LanceDB 4) Report completion"
}

Storage Guidelines

When using memory_store:

  • Keep text concise (<100 words)
  • Use appropriate category
  • Set importance 0.7-1.0 for valuable info
  • One concept per memory entry

Related skills

How it compares

Pick memory-hygiene when LanceDB auto-recall is polluting agent context; use filesystem MEMORY.md editing alone if no vector memory plugin is installed.

FAQ

What causes junk in memory-hygiene vector stores?

memory-hygiene identifies autoCapture: true on the memory-lancedb plugin as the main junk source, capturing heartbeat status, transient states, raw message logs, and OAuth tokens that should never be stored.

How does memory-hygiene wipe vector memory?

memory-hygiene clears LanceDB by removing ~/.clawdbot/memory/lancedb/ and restarting the gateway with clawdbot gateway restart, then reseeding intentional facts from MEMORY.md via memory_store.

What should memory-hygiene store intentionally?

memory-hygiene recommends storing user preferences, key project decisions, important account facts, and lessons learned—one concise concept per entry with importance 0.7 to 1.0.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.