360 Secure SkillHub
360 安全技能中心

Memory Hygiene

核心功能涵盖Clawdbot的LanceDB向量内存审计、冗余数据清理、配置优化(如关闭自动捕获)、自动化维护任务搭建;还提供付费的记忆系统审计、清理、架构设计及月度维护顾问服务。适用于内存臃肿、token因无关召回过高、需配置自动化维护的场景,支持命令行操作与配置文件修改,付费服务可通过微信/Telegram联系。

chenghaifeng08-creator
chenghaifeng08-creator
热度 53.65
最近更新 2026-05-11 17:34:40
分类:自动化依赖:代码执行 / 读写文件 / MCP 服务应用场景:自动化脚本 / 工作流 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memory-hygiene-automaton
Metadata
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.


💰 付费服务

记忆系统优化咨询:

服务 价格 交付
记忆系统审计 ¥800/次 完整分析报告 + 优化建议
向量数据库清理 ¥500/次 清理 + 重新索引
记忆架构设计 ¥2000/次 定制记忆系统架构
月度维护顾问 ¥1500/月 每周清理 + 性能监控

联系: 微信/Telegram 私信,备注"记忆优化"


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