/reflect:recallfrom reflect
Retrieves relevant prior learnings from a global knowledge base using hybrid vector + graph search. Reranks results by confidence, recency, and tag overlap. Useful when starting work, debugging recurring issues, or before implementing features with potential prior art. Supports staged recall workflow for deep investigations.
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.
Read when SKILL.md points to them; scripts run unread.
Queries the global learnings KB (GraphRAG + vector) and surfaces the top-N most relevant learnings for the current work, reranked by confidence, recency, and tag overlap.
Also fires automatically via the SessionStart hook (see
hooks/session_start_recall.py) with a 3-result cap, any confidence
(reranked by confidence/recency/tag-overlap). This skill is the
explicit, higher-limit path.
| Invocation | Behavior |
|---|---|
/reflect:recall <query> | Default — 10 results, any confidence, markdown out |
/reflect:recall <query> --limit 5 --confidence HIGH | Tight filter |
/reflect:recall <query> --mode local | Graph-neighborhood search (finds related concepts) |
/reflect:recall <query> --mode global | Community-based (broad patterns) |
/reflect:recall <query> --format json | Structured output for programmatic use |
/reflect:recall <query> --no-cache | Skip cache, force fresh query |
/reflect:recall <query> --field rule | S1: just one structured field per hit (rule/fix/root_cause/problem) — cheapest injection |
When you need more than the one-shot top-N — e.g. tracing how a problem
evolved, or hydrating several related learnings — use the staged pipeline in
scripts/recall_stages.py instead of repeated full recalls. It is the
token-cheap discipline (~10x savings vs. hydrating everything up front):
# Step 0 — print the contract (self-documenting bootstrap)
uv run {{HOME_TOOL_DIR}}/skills/recall/scripts/recall_stages.py workflow
# Step 1 — compact ID-only index: {id, title, score, project, date}
# (~50-100 tokens/result)
uv run {{HOME_TOOL_DIR}}/skills/recall/scripts/recall_stages.py index "$QUERY" --limit 20
# Step 2 — chronological neighbours around an interesting hit
# (anchor by ID, or pass a query to find the anchor automatically)
uv run {{HOME_TOOL_DIR}}/skills/recall/scripts/recall_stages.py timeline --anchor <ID> --depth-before 3 --depth-after 3
# Step 3 — full bodies + entity sidecars, ONLY for the filtered IDs
# (~500-1000 tokens/result; always batch 2+ ids)
uv run {{HOME_TOOL_DIR}}/skills/recall/scripts/recall_stages.py hydrate <ID> [<ID> ...]
Never run Step 3 without filtering through Steps 1-2 first. The index and timeline rows are deliberately ID-only so you can triage many results cheaply and hydrate only what survives.
{{HOME_TOOL_DIR}}/skills/recall/scripts/recall.py:
uv run {{HOME_TOOL_DIR}}/skills/recall/scripts/recall.py "$QUERY" --limit 10 --format markdown
[lrn-id], key insight, and how-to-apply.reflect search <id> or check the reflect repo's documents/ dir
(~/.claude/global-learnings/documents/ by default).--tags a,b,c for reranking boost.reflect search CLI (from reflect-kb,
install via uv tool install reflect-kb) as a subprocess. Resolved via
shutil.which("reflect"); falls back to the legacy
~/.learnings/cli/learnings only if the canonical CLI is missing.CE × confidence_boost × recency_boost × tag_boost × proof_boost
— cross-encoder relevance is primary; each secondary signal is a
multiplicative boost 1 + α·(norm − 0.5) bounded to ±α/2 (Hindsight
shape, port R8), so no single signal can dominate.
RECALL_CONFIDENCE_ALPHA / RECALL_RECENCY_ALPHA /
RECALL_TAG_ALPHA / RECALL_PROOF_ALPHA~/.reflect/recall_cache/, 1h TTL.~/.reflect/recall_log.jsonl for
future helpfulness analysis (Phase 6 of the retrieval plan)./reflect:ingest — populate the KB/reflect:status — KB health, coverage, pending reviewshooks/settings-snippet.json)What SKILL.md sets; muted values are Claude Code's defaults
2 plugins in one repository ship this exact skill · first indexed Jul 16, 2026
10 skills in this plugin
/consolidatereflect:consolidateProject-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.
/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.Other plugins' skills for the same job
/costreflect@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 reflect