Memory Deduplication
ReviewAudited by ClawScan on May 10, 2026.
Overview
This skill is local and purpose-aligned, but it can rewrite persistent agent memory and its documented review/rollback safeguards are not fully implemented in the provided code.
Review before installing. The code appears local and non-exfiltrating, but do not run it automatically until you have tested --dry-run output, made a separate backup of MEMORY.md, and accepted that it may merge or delete long-term memory entries.
Findings (3)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
Important long-term memories could be incorrectly merged, removed, or rewritten, affecting future agent decisions.
The tool algorithmically removes or merges MEMORY.md sections and then overwrites the persistent memory file. Incorrect merges or deletions could poison or erase context used in later tasks.
if (dup.similarity > 0.8) { toRemove.add(dup.index2); } ... fs.writeFileSync(memoryPath, newContent);Run with --dry-run first, inspect the full proposed changes manually, and keep an external backup before allowing writes.
Users may rely on safeguards that are not actually implemented and allow memory edits with less review than expected.
The documentation claims diff review, retention of the latest 10 backups, and whitelisting, but the provided code only shows a short dry-run preview, date-based backup writing, and no whitelist or retention logic.
2. **人工审核** — 生成 diff 供审核 3. **可回滚** — 保留最近 10 次备份 4. **白名单** — 某些关键信息不去重
Treat the advertised safeguards as unverified unless the code is updated to generate diffs, enforce retention, and support explicit protected-memory whitelists.
If the cron job is installed, the agent may periodically alter MEMORY.md without asking each time.
The cron command is documented as a user-directed setup example, not automatic installation behavior, but it would create scheduled autonomous memory-cleanup runs if enabled.
openclaw cron add --name "memory-dedup-weekly" ... --message "运行记忆去重,清理 MEMORY.md 冗余信息"
Only enable the cron job after validating the tool on dry-runs and confirming that automatic memory rewriting is acceptable.
