memory-hygiene

$npx mdskill add aAAaqwq/AGI-Super-Team/memory-hygiene

Audit and clean vector memory to prevent token waste.

  • Eliminates junk data causing high token usage from irrelevant recalls.
  • Integrates with LanceDB storage and Clawdbot gateway commands.
  • Decides retention by filtering out transient states and raw logs.
  • Delivers results via CLI commands and configuration patches.

SKILL.md

.github/skills/memory-hygieneView on GitHub ↗
---
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

More from aAAaqwq/AGI-Super-Team

SkillDescription
a-fund-monitor监控 A 股基金实时估值与盘后净值,自动判断交易日并生成提醒或分析。
add-leadAdd company/person/relationship to CRM
ads-agentAI-агент для управления Facebook рекламой. Вызывай для анализа, оптимизации, создания кампаний и отчётов.
afrexai-compliance-auditRun internal compliance audits against major governance and security
afrexai-personal-financeComplete personal finance system — budgeting, debt payoff, investing, tax optimization, net worth tracking, and financial independence planning. Use when managing money, building wealth, paying off debt, planning retirement, or optimizing taxes. Zero dependencies.
after-salesUse when managing post-purchase experience, building customer loyalty, or increasing repeat purchases
agent-contactsAI agent contacts — add, list, remove MCP contacts. Use when someone gives an agent URL, or when you need to view/remove contacts.
agent-model-switcher批量查看和切换子 agent 的模型配置,用于统一调整多 agent 的 provider/model 设置。
agent-patternsFormat SPAWN REQUEST messages to launch parallel agents, generate structured agent status reports, and define communication protocols within the sprint system. Use when the user needs to coordinate multiple agents, format spawn requests, produce agent reports, or establish inter-agent communication patterns.
agent-task-confirmUse when confirming whether a dispatched agent task was actually received, activated, and progressing after sessions_send or other task handoff actions.