Cortexes
A personal knowledge vault plugin for Claude Code — session recording, memory distillation, semantic retrieval.
English · 繁體中文
What It Does
Cortexes turns your working memory into a searchable knowledge base. Every
Claude Code session gets automatically recorded when it ends, then can be
distilled and retrieved later.

- Automatic capture — a full report (commits, findings, decisions) is
generated when a session ends and saved to the vault
- Semantic search — OpenAI embeddings + ChromaDB, with mixed Chinese/English
query support
- Knowledge distillation — extracts hard-won lessons, internal
conventions, and key decisions from raw session dumps
- Memory injection — detects the current repo at session start and offers
to load related memory
Design philosophy: the vault is the source of truth (plain markdown +
git); the vector store is just a rebuildable derived index.
Quick Start
1. Install the plugin
# Add the marketplace, then install the plugin from it
/plugin marketplace add https://github.com/XBlueSky/cortexes.git#plugin
/plugin install cortexes@cortex
The marketplace is named cortex and the plugin inside it is cortexes —
hence cortexes@cortex. The marketplace name is kept from 1.x on purpose so
that existing marketplace add registrations keep working.
2. Install the cortex-vec CLI
The CLI is published on PyPI as
cortex-vec:
# Recommended: isolated tool install via uv
uv tool install cortex-vec
# Or with pip
pip install cortex-vec
Upgrade with uv tool upgrade cortex-vec (or pip install -U cortex-vec)
after a plugin update. /cortexes:genesis checks for the CLI and offers this
install when it is missing. To run the unreleased development version
instead, install from the repo:
uv tool install "git+https://github.com/XBlueSky/cortexes.git@plugin#subdirectory=cortex-vec"
A pip install is also kept in step automatically. When the installed
cortex-vec differs from the copy the plugin ships, the next session
reinstalls that copy in the background (no network) and says so at the top
of the menu ("updating", then "updated" once). If the reinstall fails, every
session warns with the log path and the command to run until it is fixed.
A uv tool install lives outside the session's python3 and an editable
install (pip install -e) is yours to manage, so the sync leaves both
alone. The check needs timeout (or Homebrew's gtimeout on macOS) and is
skipped without it.
OPENAI_API_KEY is optional. Setting it enables embeddings, and with
them semantic (vector) search. Without it nothing breaks: search runs on
the local BM25 index, entirely on your machine and with nothing sent to
OpenAI — see Environment Variables.
3. Initialize
/cortexes:genesis /path/to/your/vault
This sets the vault path and author info, and builds the semantic index.
4. Start using it
"save to cortex" → manually save knowledge
"check cortex" → semantic search over the vault
"distill" → extract knowledge from Raw/
"broadcast" → fuse new Raw content into existing pages
Upgrading from 1.x to 2.0
2.0.0 renames the plugin from cortex to cortexes. Your vault, config
and indexes are untouched — there is no data migration.