/reflect:exportfrom reflect
Exports or imports the reflect knowledge base as a deterministic, git-friendly tarball including markdown corpus and reflect.db rows. Use to back up, move to another machine, or restore the KB.
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.
Snapshots the reflect knowledge base — the ~/.learnings markdown corpus plus
the reflect.db rows — into a single deterministic, git-friendly tarball, and
restores it on the same or another machine. Two scripts back this:
kb_export.py writes the tarball; kb_import.py restores it (re-running the
GraphRAG index by default).
Locate the export/import scripts robustly across deploy layouts (prefer the running plugin, else the newest cached version):
# Resolve kb_export.py.
EXPORT_PY=""
for cand in \
"${CLAUDE_PLUGIN_ROOT:-}/plugin/scripts/kb_export.py" \
$(ls -t "$HOME"/.claude/plugins/cache/*/reflect/*/plugin/scripts/kb_export.py "$HOME"/.claude/plugins/cache/*/reflect/*/scripts/kb_export.py 2>/dev/null); do
if [ -n "$cand" ] && [ -f "$cand" ]; then EXPORT_PY="$cand"; break; fi
done
if [ -z "$EXPORT_PY" ]; then
echo "kb_export.py not found — install/update the reflect plugin:"
echo " claude plugin update reflect@ainb-reflect-memory"
exit 1
fi
# kb_import.py ships alongside kb_export.py.
IMPORT_PY="$(dirname "$EXPORT_PY")/kb_import.py"
# Positional: the output tarball path. Optional --db / --learnings override
# the defaults (reflect.db from config; learnings home ~/.learnings).
python3 "$EXPORT_PY" kb.tar
# python3 "$EXPORT_PY" kb.tar --db /path/to/reflect.db --learnings /path/to/.learnings
Prints how many documents and DB rows (across how many tables) it wrote.
# Positional: the tarball produced by the export above. Restores onto this
# machine and re-runs the GraphRAG index by default.
python3 "$IMPORT_PY" kb.tar
# --db / --learnings : target reflect.db / learnings home (default: config)
# --no-reindex : skip the GraphRAG reindex after restore
# --force : overwrite a non-empty target (default: refuse)
python3 "$IMPORT_PY" kb.tar --force
Prints how many documents and DB rows it restored. By default it refuses to
overwrite a non-empty target — pass --force to replace it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
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 reflect10 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./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).
/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.
2 plugins in one repository ship this exact skill · first indexed Jul 18, 2026