From reflect
Retrieve 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/reflect:recallThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Queries the global learnings KB (GraphRAG + vector) and surfaces the top-N
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)npx claudepluginhub stevengonsalvez/agents-in-a-box --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.