From claude-code-boss
Knowledge Base — SQLite vector store with semantic search via Transformers.js (or Ollama/Voyage). Auto-indexed by hooks, auto-retrieved before every action. Scoped by project, searchable cross-project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-boss:brain-knowledgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A **persistent knowledge base** with real semantic search (vector embeddings). All significant work (tests, builds, research, patterns, lessons) is automatically indexed and available for querying in future sessions.
A persistent knowledge base with real semantic search (vector embeddings). All significant work (tests, builds, research, patterns, lessons) is automatically indexed and available for querying in future sessions.
| Layer | Technology |
|---|---|
| Storage | SQLite via better-sqlite3 |
| Embeddings | Transformers.js (default) — pure JS ONNX, 22MB model, 384-dim |
| Alternatives | Ollama (local GPU) or Voyage AI (cloud) — swap via 1 config line |
| Vector search | JS cosine similarity — <5ms for top-5 |
| Hybrid search | Vector + keyword + metadata combined |
PostToolUse (Bash) → brain-submit.js → brain-pending/ →
brain-indexer (subagent) → embedder + store + index + graph
PreToolUse (Bash/Write/Edit) → brain-retrieve.js
→ command/path embedding → cosine sim on SQLite
→ hookSpecificOutput with top-5 relevant entries
UserPromptSubmit → brain-retrieve-prompt.js
→ query embedding → semantic search
→ hookSpecificOutput with relevant entries
The PreToolUse hook outputs something like:
[BRAIN-RETRIEVE] Top entries for "npm test":
1. "test:always-cleanup-mocks" (score: 0.89) — Always restore mocks in afterEach
2. "pattern:vitest-config-memory" (score: 0.72) — Increase --pool for memory
Read the entries. Use the knowledge without asking the user.
The hook signals "N payload(s) pending indexing" when payloads are in brain-pending/. When you see this:
If the hook returned nothing useful but you know knowledge exists on the topic:
If the current project has no relevant entries, brain-retriever can search neighboring projects:
~/.claude/projects/<project>/brain/brain.db
| Provider | Config | Dependencies |
|---|---|---|
| Transformers.js (default) | "provider": "transformers" | npm install @xenova/transformers |
| Ollama | "provider": "ollama" | Ollama installed + model pulled |
| Voyage AI | "provider": "voyage" | VOYAGE_API_KEY in environment |
To switch = edit config/brain-config.json → embedder.provider. The rest of the system doesn't change.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub allansantos-dv/claude-code-plugins --plugin claude-code-boss