memory-review — Claude Code skill: what it does, how to install
Audits Claude Code auto-memory, finding stale entries, duplicate topics, and candidate rules for CLAUDE.md. Keeps MEMORY.md within its 200-line startup limit.
/plugin marketplace add alirezarezvani/claude-skills
/plugin install self-improving-agent@claude-code-skillsWhat memory-review does
The skill inspects Claude Code auto-memory directory, tracking line counts against the 200-line startup limit. It scans MEMORY.md and topic files such as debugging.md or patterns.md for recurring patterns, outdated commands, and references to deleted files. It also checks entries against CLAUDE.md and .claude/rules/ to spot rule conflicts.
The result is a structured report. It lists stale lines to delete, entries to merge, and candidate rules that appeared in two or more sessions. When a pattern proves broadly useful, the tool flags it for promotion into CLAUDE.md.
Run this check when MEMORY.md exceeds 150 lines or after finishing a major debugging run. If your project rarely uses auto-memory, you can safely skip it.
What it helps with
- Remove outdated entries and references to deleted files
- Find recurring patterns to promote into
CLAUDE.md - Merge duplicate notes about the same topic into concise rules
- Track file size against the 200-line startup memory limit
- Detect conflicts between auto-memory and project rule files
Example prompts for the agent
- /si:memory-review
- /si:memory-review --quick
- /si:memory-review --stale
How to install memory-review
1Plugin marketplace
/plugin marketplace add alirezarezvani/claude-skills/plugin install self-improving-agent@claude-code-skillsThis installs the whole self-improving-agent plugin with all its skills
2Skills CLI (Vercel)
npx skills add alirezarezvani/claude-skills --skill memory-review -a claude-code3Manually: put the files in place
~/.claude/skills/memory-review/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/memory-review/
Manually: put the files in place
.agents/skills/memory-review/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/memory-review/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install alirezarezvani/claude-skills memory-review2Manually: put the files in place
.github/skills/memory-review/SKILL.mdPlatform CLI
gemini skills install https://github.com/alirezarezvani/claude-skills --path engineering-team/self-improving-agent/skills/memory-reviewManually: put the files in place
.devin/skills/memory-review/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set349
The whole set →Similar
Questions about memory-review
How do I install memory-review in Claude Code?
Run /plugin marketplace add alirezarezvani/claude-skills followed by /plugin install self-improving-agent@claude-code-skills. You can also install it via npx skills add alirezarezvani/claude-skills --skill memory-review -a claude-code.
What does memory-review do?
It audits Claude Code auto-memory files, checks line counts against the 200-line startup limit, identifies stale entries, and flags candidates for CLAUDE.md.
When should I run memory-review?
Use it after major debugging sessions, weekly during active work, or whenever MEMORY.md approaches 150 lines.
Source text
SKILL.md · MIT
---
name: "memory-review"
description: "Analyze auto-memory for promotion candidates, stale entries, consolidation opportunities, and health metrics. Use when the user runs /si:memory-review or asks what has been learned and what should be promoted or pruned."
---
# /si:memory-review — Analyze Auto-Memory
Performs a comprehensive audit of Claude Code's auto-memory and produces actionable recommendations.
## Usage
```
/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
```
## 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:memory-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:memory-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
© Alireza Rezvani · MIT · alirezarezvani/claude-skills