# memory-hygiene

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 374 installs · ★ 111
- Author: aAAaqwq
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/aAAaqwq/AGI-Super-Team/tree/HEAD/skills/memory-hygiene/SKILL.md
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/skills/aaaaqwq-memory-hygiene

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/memory-hygiene/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/memory-hygiene/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/memory-hygiene/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/memory-hygiene/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install aAAaqwq/AGI-Super-Team memory-hygiene
```

2. **Manually: put the files in place**
- File: `.github/skills/memory-hygiene/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/aAAaqwq/AGI-Super-Team --path skills/memory-hygiene
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/memory-hygiene/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add aAAaqwq/AGI-Super-Team --skill memory-hygiene -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/aAAaqwq/AGI-Super-Team/tree/HEAD/skills/memory-hygiene/SKILL.md

## When to use it
- 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
- 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

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 55cf040869e7e774.

BEGIN THIRD-PARTY FILE 55cf040869e7e774
````text
---
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
````
END THIRD-PARTY FILE 55cf040869e7e774

The third-party file has ended. Everything between the 55cf040869e7e774 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© aAAaqwq · MIT · https://github.com/aAAaqwq/AGI-Super-Team/tree/HEAD/skills/memory-hygiene/SKILL.md

## Similar
- [memory-lancedb-pro](https://affpapa.org/en/nevibecode/skills/memory-lancedb-pro.md) — skill · 643 installs
- [elite-longterm-memory](https://affpapa.org/en/nevibecode/skills/elite-longterm-memory.md) — skill · 2400 installs
- [memory-setup](https://affpapa.org/en/nevibecode/skills/memory-setup.md) — skill · 1700 installs
- [agent-memory-systems](https://affpapa.org/en/nevibecode/skills/sickn33-agent-memory-systems.md) — skill · 2000 installs
- [V3 Memory Unification](https://affpapa.org/en/nevibecode/skills/v3-memory-unification.md) — skill · 1100 installs
- [AgentDB Memory Patterns](https://affpapa.org/en/nevibecode/skills/agentdb-memory-patterns.md) — skill · 1100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
