cortexdb-export-memory
Export all CortexDB memories to Markdown files (Claude Code memory-file layout)
Turn study material (physics, chemistry, math, a language, …) into a prerequisite knowledge graph, and get an ordered study plan
> /plugin marketplace add liliang-cn/cortexdb > /plugin install cortexdb@cortexdb
How it fires
How this command gets triggered: by you, by Claude, or both.
/cortexdb-learnContext preview
What this command does when you run it.
Turn study material (physics, chemistry, math, a language, …) into a prerequisite knowledge graph, and get an ordered study plan
description: Turn study material (physics, chemistry, math, a language, …) into a prerequisite knowledge graph, and get an ordered study plan
Build and query a **learning knowledge graph**: study material as concepts linked by *prerequisite* edges, so the graph can answer what retrieval cannot — **"what must I learn, and in what order, before I can understand X?"**, "what am I ready to study now?", and "why am I stuck on this?".
**You are the extractor**, so this works for any subject and any language of material (physics, chemistry, math, foreign-language grammar/vocabulary, …).
Locate the binary once:
bin=$(ls -t ~/.claude/plugins/data/cortexdb-cortexdb/bin/cortexdb-mcp-* 2>/dev/null | head -1)
[ -n "$bin" ] || bin="${CORTEXDB_MCP_BIN:-cortexdb-mcp}"Decide what the user wants from `$ARGUMENTS`:
Read the material (or draw on your own knowledge of the subject if the user just names a topic). Extract:
Keep prerequisite edges **acyclic** and genuinely pedagogical (only "you truly cannot understand A without B"). Write JSON to a temp file and import:
{"subject":"physics",
"concepts":[{"name":"加速度","type":"concept","difficulty":2}],
"relations":[{"from":"牛顿第二定律","to":"加速度","type":"requires"}]}"$bin" --import-learning-graph /tmp/learning.json
"$bin" --learn-path "<concept>" # ordered prerequisites, mastered ones removed "$bin" --learn-next # what is ready to study right now "$bin" --learn-mastered <concept>… # record what the user already knows
Then report the plan in the user's language, explaining *why* the order is what it is (which concept unlocks which). If a concept is missing from the graph, offer to ingest material for it (step A). Re-running is safe — imports update in place.
$ARGUMENTS
AI memory and a knowledge graph in one SQLite file. Pure Go, no service to run, works without an embedding model.
Export all CortexDB memories to Markdown files (Claude Code memory-file layout)
Show CortexDB knowledge-graph facts valid at a point in time (as-of / bitemporal query)
Answer a whole-corpus question over the CortexDB brain using GraphRAG global search
Reconcile new text against the knowledge graph with an LLM — add, correct, and retract facts (no embedder needed)
Open the brain's knowledge graph — a live 3D view, or a static file to send
Turn a codebase (any language) into a CortexDB knowledge graph and open an interactive view