/reflect:corpusfrom reflect
Builds a durable, filtered slice of the reflect-kb learnings for sustained Q&A sessions. Use for repeated queries against a specific area like auth or migration logs, unlike one-shot /reflect:recall.
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.
reflect-kb is search-shaped: every /reflect:recall is a fresh hybrid query.
A corpus is the complementary pattern — a long-lived, filtered slice of the
user's own learnings that you hold open and answer a question-set against.
You (the agent) ARE the Q&A session. There is no SDK subprocess: the build step snapshots the filtered learnings to a JSON file and prints a primed context document; you read that document and answer questions over it.
For a one-shot retrieval, use /reflect:recall instead.
Space-separated key:value tokens. Bare tokens are treated as tags. All
predicates AND together; tag: may repeat (or use tag:a,b) to OR tags.
| token | meaning |
|---|---|
tag:auth / auth | learning carries this tag (case-insensitive) |
category:security | frontmatter category equals this |
project:api | frontmatter project_id/project equals this |
since:2026-01-01 | learning created/archived date ≥ this (inclusive) |
until:2026-06-30 | learning created/archived date ≤ this (inclusive) |
Run the corpus builder via the recall script (no embedding model loads — the filter is pure frontmatter logic):
${CLAUDE_PLUGIN_ROOT}/plugin/skills/recall/scripts/recall.py \
--corpus auth-subsystem \
--corpus-filter "tag:auth category:security project:api" \
--format markdown
This snapshots every matching learning to
$REFLECT_STATE_DIR/corpora/auth-subsystem.json (default
~/.reflect/corpora/) — persisting the filter, a last-built timestamp, and the
KB mtime — and prints the primed context document.
Then: read the printed document and answer the user's questions using ONLY the learnings in it. Treat it as the full context for this corpus session.
The KB drifts as the user works (new learnings ingested, old ones archived). Re-run the saved filter — no need to restate it:
${CLAUDE_PLUGIN_ROOT}/plugin/skills/recall/scripts/recall.py \
--corpus auth-subsystem --corpus-rebuild --format json
--corpus-rebuild re-applies the persisted filter against the current KB:
newly-matching learnings are pulled in, entries that no longer match (or were
deleted) are dropped. The JSON form reports "stale": true/false — stale
means the KB has been written since the snapshot was built, i.e. it's time to
reprime before answering further.
build_corpus(filter) runs the filter, writes the snapshot.stale), --corpus-rebuild and re-read.The deterministic build/filter/snapshot/reprime engine lives in
reflect-kb/src/reflect_kb/recall/corpus.py; the LLM-driven Q&A is yours.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
knowledge-base, corpus, qa-session, filtered-search, reflect-kb
Other plugins' skills for the same job
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.
/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 Jul 18, 2026