review
分析自动记忆中的晋升候选人、陈旧条目、整合机会和健康指标。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw skills install shop:totalclaw:totalclaw~auto-memory-pro-reviewcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~auto-memory-pro-review/file -o auto-memory-pro-review.md# /si:review — Analyze Auto-Memory
Performs a comprehensive audit of Claude Code's auto-memory and produces actionable recommendations.
## Usage
```
/si:review # Full review
/si:review --quick # Summary only (counts + top 3 candidates)
/si:review --stale # Focus on stale/outdated entries
/si:review --candidates # Show only promotion candidates
```
## What It Does
### Step 1: Locate memory directory
```bash
# 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`.
### Step 2: Read and analyze MEMORY.md
Read the full `MEMORY.md` file. Count lines and check against the 200-line startup limit.
Analyze each entry for:
1. **Recurrence indicators**
- Same concept appears multiple times (different wording)
- References to "again" or "still" or "keeps happening"
- Similar entries across topic files
2. **Staleness indicators**
- References files that no longer exist (`find` to verify)
- Mentions outdated tools, versions, or commands
- Contradicts current CLAUDE.md rules
3. **Consolidation opportunities**
- Multiple entries about the same topic (e.g., three lines about testing)
- Entries that could merge into one concise rule
4. **Promotion candidates** — entries that meet ALL criteria:
- Appeared in 2+ sessions (check wording patterns)
- Not project-specific trivia (broadly useful)
- Actionable (can be written as a concrete rule)
- Not already in CLAUDE.md or `.claude/rules/`
### Step 3: Read topic files
If `MEMORY.md` references or the directory contains additional files (`debugging.md`, `patterns.md`, etc.):
- Read each one
- Cross-reference with MEMORY.md for duplicates
- Check for entries that belong in the main file (high value) vs. topic files (details)
### Step 4: Cross-reference with CLAUDE.md
Read the project's `CLAUDE.md` (if it exists) and compare:
- Are there MEMORY.md entries that duplicate CLAUDE.md rules? (→ remove from memory)
- Are there MEMORY.md entries that contradict CLAUDE.md? (→ flag conflict)
- Are there MEMORY.md patterns not yet in CLAUDE.md that should be? (→ promotion candidate)
Also check `.claude/rules/` directory for existing scoped rules.
### Step 5: Generate report
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}}
```
## When to Use
- After completing a major feature or debugging session
- When `/si:status` shows MEMORY.md is over 150 lines
- Weekly during active development
- Before starting a new project phase
- After onboarding a new team member (review what Claude learned)
## Tips
- Run `/si:review --quick` frequently (low overhead)
- Full review is most valuable when MEMORY.md is getting crowded
- Act on promotion candidates promptly — they're proven patterns
- Don't hesitate to delete stale entries — auto-memory will re-learn if needed
---
## 中文说明
# /si:review — 分析自动记忆
对 Claude Code 的自动记忆进行全面审计,并给出可执行的建议。
## 用法
```
/si:review # Full review
/si:review --quick # Summary only (counts + top 3 candidates)
/si:review --stale # Focus on stale/outdated entries
/si:review --candidates # Show only promotion candidates
```
## 它做什么
### 第 1 步:定位记忆目录
```bash
# 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"/
```
如果记忆目录不存在,则报告自动记忆可能已被禁用。建议使用 `/memory` 进行检查。
### 第 2 步:读取并分析 MEMORY.md
读取完整的 `MEMORY.md` 文件。统计行数,并对照 200 行的启动上限进行检查。
针对每个条目分析以下方面:
1. **重复出现的迹象**
- 同一概念多次出现(措辞不同)
- 出现"again""still"或"keeps happening"之类的表述
- 各主题文件中存在相似条目
2. **陈旧迹象**
- 引用了已不存在的文件(用 `find` 验证)
- 提及过时的工具、版本或命令
- 与当前的 CLAUDE.md 规则相冲突
3. **整合机会**
- 关于同一主题的多个条目(例如关于测试的三行内容)
- 可以合并为一条简洁规则的条目
4. **晋升候选条目** —— 同时满足以下所有标准的条目:
- 在 2 个以上会话中出现(检查措辞模式)
- 不是项目专属的琐碎信息(具有广泛适用性)
- 可执行(能够写成一条具体规则)
- 尚未存在于 CLAUDE.md 或 `.claude/rules/` 中
### 第 3 步:读取主题文件
如果 `MEMORY.md` 有引用,或目录中包含额外的文件(`debugging.md`、`patterns.md` 等):
- 逐个阅读
- 与 MEMORY.md 交叉比对,查找重复内容
- 检查哪些条目应归入主文件(高价值)而非主题文件(细节)
### 第 4 步:与 CLAUDE.md 交叉比对
读取项目的 `CLAUDE.md`(如果存在)并进行比较:
- 是否有 MEMORY.md 条目与 CLAUDE.md 规则重复?(→ 从记忆中移除)
- 是否有 MEMORY.md 条目与 CLAUDE.md 相冲突?(→ 标记冲突)
- 是否有尚未进入 CLAUDE.md 但应当进入的 MEMORY.md 模式?(→ 晋升候选条目)
同时检查 `.claude/rules/` 目录中已有的限定作用域规则。
### 第 5 步:生成报告
输出格式:
```
📊 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:status` 显示 MEMORY.md 超过 150 行时
- 在活跃开发期间每周进行一次
- 在开始新的项目阶段之前
- 在新团队成员入职之后(回顾 Claude 学到了哪些内容)
## 提示
- 经常运行 `/si:review --quick`(开销很低)
- 当 MEMORY.md 越来越拥挤时,完整审查最有价值
- 及时处理晋升候选条目 —— 它们是经过验证的模式
- 不要犹豫删除陈旧条目 —— 如有需要,自动记忆会重新学习