exocortex CLAUDE.md

Project instructions for Exocortex, a local-first personal memory system that stores information in SQLite and searches it in several ways.

In plain words
What is it for?
Use them when developing, testing, building, linting, benchmarking, or configuring Exocortex and its MCP server.
Why use it?
They explain the monorepo structure, development commands, search scoring choices, and how to connect the system to MCP-compatible tools.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/shawnhack/exocortex/claude-md
Clone the repo
git clone --depth 1 https://github.com/shawnhack/exocortex
Per session 2,924 This file is loaded in full into every session.
When invoked 2,924 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02924 $0.02924
Opus 5 $0.01462 $0.01462
Sonnet 5 $0.00585 $0.00585
Haiku 4.5 $0.00292 $0.00292

Measured yesterday against content hash c8a984d5c8d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

exocortex CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

**Codex CLI** (`~/.codex/config.toml`):
CLAUDE.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Exocortex

Personal unified memory system — SQLite-backed, local-first, hybrid RAG retrieval.

Stack

  • Monorepo: pnpm workspaces
  • Packages: core (+ benchmark suite at core/src/benchmark/), cli, server, mcp, dashboard
  • DB: Node built-in SQLite (node:sqlite)
  • Embeddings: HuggingFace bge-small-en-v1.5 (local, 384 dims, no API key)
  • Scoring: Reciprocal Rank Fusion (RRF) by default, fusing vector + FTS + graph ranked lists with recency/frequency/usefulness/valence/quality/goal-relevance boost. Legacy weighted-average mode available via scoring.use_rrf=false. All parseFloat calls have NaN guards with safe fallbacks.
  • Dashboard: React + Vite, Neural Interface theme
  • Tests: Vitest

Key Commands

  • pnpm test — run all tests (~533 tests)
  • pnpm build — build all packages
  • pnpm lint — typecheck with tsc
  • pnpm benchmark — run memory benchmark (requires ANTHROPIC_API_KEY)

MCP Setup

The MCP server works with any MCP-compatible tool (Claude Code, Codex, Gemini, Copilot, etc.). The entry point is packages/mcp/dist/index.js.

Claude Code (registered globally so memory tools are available in every session):

claude mcp add --scope user exocortex node /path/to/exocortex/packages/mcp/dist/index.js

Codex CLI (~/.codex/config.toml):

[mcp_servers.exocortex]
command = "node"
args = ["/path/to/exocortex/packages/mcp/dist/index.js"]

Gemini CLI (~/.gemini/settings.json):

{ "mcpServers": { "exocortex": { "command": "node", "args": ["/path/to/exocortex/packages/mcp/dist/index.js"] } } }

The project-level .mcp.json also exists as a fallback for this repo specifically (update the path after cloning).

Data Directory

All data stored in ~/.exocortex/ (DB + cached embedding models). Override model cache with EXOCORTEX_MODEL_DIR env var.

Dashboard Pages

  • Dashboard (/dashboard) — memory storage overview (stats, charts, temporal data, tier distribution)
  • Search (/) — hybrid search with tier quick-filters, advanced filters (content type, tier, date range, importance, namespace), bulk select/delete, inline new memory creation, keyboard shortcuts (/ to focus, arrow keys to paginate, Escape to cancel select)
  • Timeline (/timeline) — chronological memory view with keyboard shortcuts
  • Entities (/entities) — entity list by type with bulk select/delete, scrollable layout
  • Entity Detail (/entities/:id) — entity info, relationship list + radial SVG graph, linked memories
  • Graph (/graph) — interactive force-directed knowledge graph (canvas-based). Drag nodes, scroll to zoom, click to navigate
  • Goals (/goals) — goal tracking with milestone progress
  • Memory Detail (/memory/:id) — full memory view with inline edit mode (content, tags, importance), supersession diff view, soft-delete to trash
  • Library (/library) — ingested reference documents with server-side search
  • Sources (/sources) — memory attribution breakdown by provider/model/agent
  • Analytics (/analytics) — quality trends, tier distribution, producer quality, tag health, embedding coverage
  • Skills (/skills) — agent-created knowledge skills from Exocortex
  • Trash (/trash) — archived/superseded memories with restore and permanent delete
  • Chat (/chat) — RAG-powered Q&A with multi-turn conversation history, sources linked to memory detail
  • Settings (/settings) — system configuration, export, and bulk import. API keys are masked in responses

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 106 lines · 2,924 tokens per session scan B c8a984d5c8d7

Subscribe to this mod's changes

exocortex CLAUDE.md is an instructions file published in the GitHub repository shawnhack/exocortex (1 stars, last pushed 27d ago), licensed MIT. It adds 2,924 tokens to every session, about $0.0146 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.