/reflect:consolidatefrom reflect
Merges orphaned worktree memory directories into a single .agents/MEMORY.md for the current project. Deduplicates entries and proposes cleanup of orphaned dirs.
Ships in reflect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/corpusreflect:corpusBuild a long-lived, filtered SLICE of the global learnings KB and answer a question-set over it ("ask the auth subsystem", "ask the migration log"). Unlike /reflect:recall (a fresh hybrid query each time), a corpus is a saved filter snapshotted to disk — prime it once, ask many questions, reprime when the KB drifts. Use when the user wants a durable Q&A session against one filtered area of their own code history rather than a one-shot search./costreflect:costReport reflect drain spend over a time window — tokens split by cached
(cache_read), uncached writes (cache_creation), and io (input+output), with a
$ estimate, grouped by day / outcome / model / transcript. Reads the drainer's
cost log and surfaces outlier runs and cache-reuse health (the 41.5M-token
failure mode = low cache reuse + high cache writes). Also reports the recall
followup rate (the recall-quality self-monitor: how often a session searched
again within 30s and got disjoint results). Use to answer "what is
reflection costing me" for the last day / week, or "is recall satisfying".
/errors-ackreflect:errors-ackTriage and acknowledge entries in the reflect errors sink
(~/.reflect/errors.json). Invoked from the statusline ⚠N badge when
pipeline errors accumulate (drain poison, parser crashes, ingest
failures, hook timeouts).
/exportreflect:exportExport or import the reflect knowledge base as a deterministic,
git-friendly tarball — the learnings markdown corpus plus the reflect.db
rows in one snapshot. Use to back up the KB, move it to another machine,
or restore it: `export` writes the tarball, `import` restores it (with an
optional GraphRAG reindex). Answers "snapshot my reflect KB", "move my
learnings to another machine", or "restore my knowledge base from a backup".
/ingestreflect:ingestThe global knowledge indexer. Harvests ALL memory sources across all tools
(Claude, Codex, Copilot, Gemini) and all project types into the unified
GraphRAG + QMD knowledge base. Archives originals, generates entity sidecars,
and dual-indexes for future retrieval. This is THE command that makes the
knowledge base comprehensive.
/recallreflect:recallRetrieve relevant prior learnings from the global knowledge base. Hybrid
vector + graph search over 170+ indexed learnings, reranked by confidence,
recency, and tag overlap. Use when starting work, debugging a recurring
problem, or before implementing a feature that may have prior art.
reflect@agents-in-a-box is listed by stevengonsalvez/agents-in-a-box — review the source before installing
npx claudepluginhub stevengonsalvez/agents-in-a-box --plugin reflect2 plugins in one repository ship this exact skill · first indexed Jun 20, 2026