plugins/reflect/skills/consolidate/SKILL.md
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.
npx skillsauth add stevengonsalvez/agents-in-a-box reflect:consolidateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.mddocumentation
Report 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). Use to answer "what is reflection costing me" for the last day / week.
development
Show fleet status — every claude session running on the host, merged across ainb + claude-peers broker + background jobs. Use when you need to enumerate sessions before composing an action, see which sessions have a peer registered (broker-routable) vs tmux-only, check the `summary` of each session, or pipe the list into jq for filtering. Default output: text table. Pass --format json for LLM consumption.
testing
Ordered multi-step prompts to fleet targets, ack-gated between steps via JSONL assistant-turn-end detection. Use for cycles like disconnect→reconnect→verify, or any flow where step N+1 requires step N to have completed first. The skill BLOCKS until each target's transcript shows the next assistant turn finishing OR per-step timeout fires (default 300s).
development
Center control panel — enumerate every claude session that is blocked waiting on something: a user answer (AskUserQuestion fired), an API error retry, an idle assistant turn-end with no follow-up, or an explicit WAITING: marker. Returns rich JSON with signal kind + context per session. Use this when you've stepped away from the fleet and want one place to see everything that wants your attention and answer it.