From reflect
Project-level memory consolidation. Merges orphaned worktree memory directories into a single .agents/MEMORY.md for the current project. Deduplicates, sections, and proposes cleanup of orphan dirs. Does NOT index into the global knowledge base — use reflect:ingest for that.
How this skill is triggered — by the user, by Claude, or both
Slash command
/reflect:consolidateThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Merge orphaned worktree memory directories for the current project into a single,
Merge orphaned worktree memory directories for the current project into a single,
tidy .agents/MEMORY.md. This is a project-level operation — it does not
touch the global knowledge base.
For global indexing (GraphRAG + QMD), use /reflect:ingest after consolidating.
.agents/MEMORY.md current and deduped/reflect:ingest (consolidate first, then index).agents/MEMORY.md (200-line max)reflect:ingest)~/.learnings/ — that's ingest's jobpython3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/memory_discovery.py project-id
# -> e.g. "shotclubhouse"
python3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/memory_discovery.py discover --provider claude
# Lists all worktree memory dirs for the current repo
# Excludes current session's memory dir
Read from each matched directory. Extract individual entries (sections, bullets, paragraphs).
Group by section, remove redundant entries:
Check if entries match existing skill topics (check {{HOME_TOOL_DIR}}/skills/ and
.claude/skills/). Propose adding matching content to those skills.
.agents/MEMORY.mdConsolidated, deduped, within 200-line limit:
# Project Memory
> Auto-consolidated by /reflect:consolidate. 200-line max.
> Detailed learnings route to skills. Global index via /reflect:ingest.
## Architecture & Patterns
## Build & Deploy
## Gotchas & Workarounds
## Testing
## Environment & Config
Sections are dynamic — empty sections removed, new sections created as needed.
Check if .claude/CLAUDE.md or .claude/AGENTS.md contains @.agents/MEMORY.md.
If not, add it at the top.
Show list of orphaned dirs and ask for confirmation:
# After user approval:
python3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/memory_discovery.py cleanup /tmp/reflect-cleanup-dirs.txt --execute
## Consolidation Complete
- **Orphaned dirs processed**: 7
- **Entries consolidated**: 42
- **Duplicates removed**: 15
- **Routed to skills**: 3
- **.agents/MEMORY.md**: 127 lines
- **Dirs cleaned up**: 7
Next: Run `/reflect:ingest` to index into GraphRAG + QMD.
Check orphaned memory status without making changes:
python3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/memory_discovery.py stats
# -> Repo: shotclubhouse
# -> Orphaned memory dirs: 7
# -> Total lines across all: 283
.agents/MEMORY.md before writing.agents/MEMORY.mdnpx claudepluginhub stevengonsalvez/ainb-reflect-memory --plugin reflectCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.