Install
openclaw skills install @milesnee/memory-auditAudit and repair agent memory systems using DDIA reliability + DDD bounded-context analysis. Triggers when memory feels stale, bloated, inconsistent, or during periodic health checks.
openclaw skills install @milesnee/memory-audit当记忆系统出现膨胀、不一致、查询质量差、架构耦合等问题时,用软件工程视角系统化诊断和修复。
Dual lens:
Five problem domains:
| 域 | 核心问题 | 典型症状 |
|---|---|---|
| Schema | 无Schema约束,自由文本退化 | 字段不一致,无法程序化解析 |
| Consistency | 多存储间状态脱节 | MEMORY.md写了旧模型,实际已换 |
| Query | 无去重、无联合搜索 | 搜出重复,漏掉归档 |
| Lifecycle | 无GC、无过期标记 | 历史项目堆积,噪音淹没信号 |
| Coupling | 配置/运维/理论混杂 | 改一处牵一片,token浪费 |
python3 scripts/audit_baseline.py --workspace . --report /tmp/audit-baseline.json
Collect: file counts, line counts, Front Matter coverage, duplication rate, staleness score.
python3 scripts/audit_diagnose.py --baseline /tmp/audit-baseline.json --output /tmp/audit-report.md
Each finding → priority bucket (P0-P4):
Work P0 → P4 sequentially. Each fix:
python3 scripts/audit_validate.py --report /tmp/audit-report.md
| Script | Source | Purpose |
|---|---|---|
audit_baseline.py | this skill | Collect workspace metrics |
audit_diagnose.py | this skill | Generate prioritized findings |
audit_validate.py | this skill | Verify fixes passed |
memory_gc.py | workspace | Semi-auto GC scan → suggestions |
staleness_check.py | workspace | Detect stale entries (>60d) |
unified_search.py | workspace | Cross-store federated search |
knowledge_graph.py | workspace | Node/edge graph from memory |
gen_references_index.py | workspace | Auto-generate INDEX.md |
This skill assumes an OpenClaw-style workspace:
workspace/
MEMORY.md # long-term semantic memory
AGENTS.md # operational handbook
SOUL.md # persona/behavior rules
TOOLS.md # ops reference
IMPLEMENT.md # task tracker
memory/*.md # daily episodic logs
references/*.md # archived source materials
traces/ # agent execution traces
docs/ # migrated detailed docs
For other layouts, adapt audit_baseline.py path constants.