‹ 首页

memory-hygiene

@mahsumaktas · 收录于 1 周前 · 上游提交 4 个月前

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.

适合你,如果Clawdbot的记忆中积累了大量无用信息

/ 通过 npx 安装 校验哈希
npx oh-my-skill add mahsumaktas/agent-evolution-kit/memory-hygiene
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- mahsumaktas/agent-evolution-kit/memory-hygiene
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify mahsumaktas/agent-evolution-kit/memory-hygiene
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
1GitHub stars
~402上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 c599c87 · 表述以原文为准
它做什么

装上后,Claude 可以检查、清理和优化 Clawdbot 的向量记忆(LanceDB),删除垃圾记忆,减少不必要的 token 消耗。

什么时候触发

当记忆被垃圾信息塞满、token 用量因无关自动召回而过高,或需要设置记忆维护自动化时触发。

装好后可以这样说
Claude 会执行记忆审计,列出最近存储的记忆条目。
Claude 会删除整个记忆数据库,然后重启网关。
技能原文 SKILL.md作者撰写 · MIT · c599c87

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
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。