Install
openclaw skills install memory-dedupAutomatically identify, merge, and clean duplicate or outdated entries in MEMORY.md to maintain concise, organized, and up-to-date information.
openclaw skills install memory-dedup保持 MEMORY.md 清洁,避免信息冗余
随着时间推移,MEMORY.md 会出现:
识别并合并相似内容:
原始:
- AgentAwaken 网站开发中
- AgentAwaken 项目进行中
- AgentAwaken 待部署
合并后:
- AgentAwaken 网站: 开发中,待部署
原始:
- [P0] NeuroBoost v5.0 发布待重试
更新后:
- [P0] NeuroBoost v5.0 ✅ 已发布 (2026-02-26)
原始:
### AgentAwaken
- 代码: /root/.openclaw/workspace/agentawaken
### AgentAwaken 域名
- agentawaken.xyz 待绑定
### AgentAwaken 部署
- 需要 Vercel
合并后:
### [P0] AgentAwaken 网站
- 代码: /root/.openclaw/workspace/agentawaken
- 域名: agentawaken.xyz (待绑定)
- 部署: Vercel (待配置)
function similarity(text1, text2) {
// Jaccard 相似度
const words1 = new Set(text1.toLowerCase().split(/\s+/));
const words2 = new Set(text2.toLowerCase().split(/\s+/));
const intersection = new Set([...words1].filter(x => words2.has(x)));
const union = new Set([...words1, ...words2]);
return intersection.size / union.size;
}
# 运行去重
node skills/memory-dedup/dedup.mjs
# 预览(不修改文件)
node skills/memory-dedup/dedup.mjs --dry-run
# 备份后去重
node skills/memory-dedup/dedup.mjs --backup
=== Memory Deduplication Report ===
📊 统计:
- 原始条目: 87
- 重复条目: 12
- 合并条目: 5
- 删除条目: 7
- 最终条目: 68
🔍 发现的重复:
1. "AgentAwaken 网站开发" (3 次)
→ 合并为 1 条
2. "NeuroBoost v5.0 发布" (2 次)
→ 保留最新版本
✅ MEMORY.md 已优化
💾 备份保存到: memory/MEMORY-backup-2026-03-01.md
# 每周日凌晨 2 点自动去重
openclaw cron add --name "memory-dedup-weekly" \
--cron "0 2 * * 0" --tz "Asia/Shanghai" \
--session isolated --agent main \
--message "运行记忆去重,清理 MEMORY.md 冗余信息"