Skip to main content
skill CX Codex

memory-hygiene — Claude Code skill: vector memory cleanup

A skill that audits and cleans Clawdbot's LanceDB vector memory when auto-recalls drag in junk and burn tokens.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a claude-code
Open on GitHub

What memory-hygiene does

The skill inspects what Clawdbot keeps in its LanceDB vector memory and helps strip the junk out. An audit runs through memory_recall query="*" limit=50, so you can see every stored entry. A full wipe is rm -rf ~/.clawdbot/memory/lancedb/ followed by clawdbot gateway restart.

The usual source of junk is autoCapture: true. The skill walks through disabling auto-capture with gateway action=config.patch while leaving autoRecall on. After a wipe you reseed memory from MEMORY.md using memory_store with a category and an importance weight.

For ongoing upkeep there is a monthly cron: wipe, parse MEMORY.md, store the key facts into a fresh LanceDB, report back. The skill advises keeping preferences, decisions, important facts and lessons learned, and skipping heartbeat statuses, transient state, raw message logs and OAuth tokens. Entries should stay under 100 words, one concept each.

What it helps with

  • see what is actually stored in vector memory
  • clear junk auto-captured memories from LanceDB
  • turn off auto-capture while keeping auto-recall
  • reseed memory with key facts after a wipe
  • set up a monthly cron for memory upkeep

Example prompts for the agent

  • audit Clawdbot's vector memory and show me what has piled up
  • wipe the LanceDB memory and restart the gateway
  • set up a monthly cron to clean and reseed memory

How to install memory-hygiene

1Skills CLI (Vercel)

npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a claude-code

2Manually: put the files in place

~/.claude/skills/memory-hygiene/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/memory-hygiene/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about memory-hygiene

How do I install memory-hygiene in Claude?

Run npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a claude-code. The skill lands in ~/.claude/skills/memory-hygiene/SKILL.md.

What does memory-hygiene do?

It audits Clawdbot's LanceDB vector memory, cleans it and reseeds it with key facts. It also shows how to disable auto-capture and schedule monthly maintenance.

What does the skill need to work?

Clawdbot with the memory-lancedb plugin, plus a MEMORY.md file to reseed memory from after a wipe.

Source text

SKILL.md · MIT
---
name: memory-hygiene
description: Audit, clean, and optimize Clawdbot's vector memory (LanceDB). Use when memory is bloated with junk, token usage is high from irrelevant auto-recalls, or setting up memory maintenance automation.
homepage: https://github.com/xdylanbaker/memory-hygiene
---

# 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
```bash
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:

```json
{
  "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

© aAAaqwq · MIT · aAAaqwq/AGI-Super-Team

Similar skills

All skills for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor