Analyze auto-memory for promotion candidates, stale entries, consolidation opportunities, and health metrics. Use when the user runs /si:memory-review or asks w
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-memory-review-91e9edb0d0d4 ,按照其中的说明把「memory-review」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Performs a comprehensive audit of Claude Code's auto-memory and produces actionable recommendations.
/si:memory-review # Full review
/si:memory-review --quick # Summary only (counts + top 3 candidates)
/si:memory-review --stale # Focus on stale/outdated entries
/si:memory-review --candidates # Show only promotion candidates
# Find the project's auto-memory directory
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
# Fallback: check common path patterns
# ~/.claude/projects/<user>/<project>/memory/
# ~/.claude/projects/<absolute-path>/memory/
# List all memory files
ls -la "$MEMORY_DIR"/
If memory directory doesn't exist, report that auto-memory may be disabled. Suggest checking with /memory.
Read the full MEMORY.md file. Count lines and check against the 200-line startup limit.
Analyze each entry for:
Recurrence indicators
Staleness indicators
find to verify)Consolidation opportunities
Promotion candidates — entries that meet ALL criteria:
.claude/rules/If MEMORY.md references or the directory contains additional files (debugging.md, patterns.md, etc.):
Read the project's CLAUDE.md (if it exists) and compare:
Also check .claude/rules/ directory for existing scoped rules.
Output format:
📊 Auto-Memory Review
Memory Health:
MEMORY.md: {{lines}}/200 lines ({{percent}}%)
Topic files: {{count}} ({{names}})
CLAUDE.md: {{lines}} lines
Rules: {{count}} files in .claude/rules/
🎯 Promotion Candidates ({{count}}):
1. "{{pattern}}" — seen {{n}}x, applies broadly
→ Suggest: {{target}} (CLAUDE.md / .claude/rules/{{name}}.md)
2. ...
🗑️ Stale Entries ({{count}}):
1. Line {{n}}: "{{entry}}" — {{reason}}
2. ...
🔄 Consolidation ({{count}} groups):
1. Lines {{a}}, {{b}}, {{c}} all about {{topic}} → merge into 1 entry
2. ...
⚠️ Conflicts ({{count}}):
1. MEMORY.md line {{n}} contradicts CLAUDE.md: {{detail}}
💡 Recommendations:
- {{actionable suggestion}}
- {{actionable suggestion}}
/si:memory-status shows MEMORY.md is over 150 lines/si:memory-review --quick frequently (low overhead)