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.
npx agentmods add instructions/gzoonet/cortex/claude-mdgit clone --depth 1 https://github.com/gzoonet/cortexWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02316 | $0.02316 |
| Opus 5 | $0.01158 | $0.01158 |
| Sonnet 5 | $0.00463 | $0.00463 |
| Haiku 4.5 | $0.00232 | $0.00232 |
Grade A, and why
cortex CLAUDE.md scanned grade A with 0 findings 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 2d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — GZOO Cortex Project Instructions
Read this file on every session. It is the single source of truth for working on GZOO Cortex. Detailed specs live in
/docs/— reference them before implementing any component.
What Is GZOO Cortex
GZOO Cortex is a local-first knowledge orchestrator that watches your project files, extracts entities and relationships using LLMs, stores them in a knowledge graph, and lets you query your own decisions, patterns, and context via natural language CLI and web interface.
Core value prop: You work across 5+ projects. GZOO Cortex remembers what you decided, why, and where — so you never lose context switching between projects.
Tech Stack
| Layer | Technology | Why |
|---|---|---|
| Runtime | Node.js 20+ with TypeScript (strict mode) | Fast I/O, native file watching |
| Database | SQLite via better-sqlite3 (WAL mode) | Zero-config, single-file, fast |
| Vector DB | LanceDB (embedded) | Columnar vectors, no server |
| LLM (Cloud) | Anthropic Claude Sonnet 4.5 / Haiku 4.5 | Primary cloud provider |
| LLM (Local) | Ollama + Mistral 7B | Local inference for hybrid/local modes |
| File Watching | Chokidar | Battle-tested, cross-platform |
| Parsing | tree-sitter (code), unified/remark (markdown) | AST-level extraction |
| CLI | Commander.js + Ink (React for terminals) | Rich interactive CLI |
| Web UI | React + Vite | Localhost dashboard |
| Monorepo | npm workspaces | Simple, no extra tooling |
Monorepo Structure
cortex/
├── CLAUDE.md ← YOU ARE HERE
├── package.json ← root workspace config
├── tsconfig.base.json ← shared TypeScript config
├── packages/
│ ├── core/ ← shared types, event bus, config, errors
│ │ └── src/
│ │ ├── types/ ← ALL TypeScript interfaces (see docs/types.md)
│ │ ├── events/ ← EventBus implementation
│ │ ├── config/ ← Config loader + Zod validation
│ │ └── errors/ ← CortexError class + error codes
│ ├── ingest/ ← file watcher, parsers, chunker
│ │ └── src/
│ │ ├── watcher.ts ← Chokidar wrapper
│ │ ├── parsers/ ← markdown, typescript, json, yaml, conversation parsers
│ │ └── chunker.ts ← content splitting for LLM context
│ ├── graph/ ← SQLite store, LanceDB vectors, query engine
│ │ └── src/
│ │ ├── sqlite-store.ts ← entity/relationship CRUD
│ │ ├── vector-store.ts ← LanceDB embedding storage
│ │ └── query-engine.ts ← context assembly for LLM queries
│ ├── llm/ ← LLM provider abstraction, prompts
│ │ └── src/
│ │ ├── providers/ ← anthropic.ts, ollama.ts
│ │ ├── prompts/ ← versioned prompt templates (see docs/prompts.md)
│ │ ├── router.ts ← smart routing (cloud, hybrid, local-first, local-only)
│ │ └── cache.ts ← response caching
│ ├── cli/ ← all CLI commands
│ │ └── src/
│ │ ├── commands/ ← init, watch, query, find, status, costs, config, etc.
│ │ └── index.ts ← Commander.js entry point
│ ├── mcp/ ← MCP server (stdio transport)
│ │ └── src/
│ │ └── index.ts ← 4 tools: get_status, list_projects, find_entity, query_cortex
│ ├── server/ ← Express API backend for web dashboard
│ └── web/ ← React dashboard (Vite)
├── docs/ ← SPEC FILES (read before implementing)
│ ├── types.md ← ALL TypeScript interfaces
│ ├── prompts.md ← ALL LLM prompts with schemas
│ ├── api-contracts.md ← REST API, WebSocket, event bus contracts
│ ├── cli-commands.md ← Every CLI command spec
│ ├── config.md ← Full config schema + defaults
│ ├── errors.md ← Error codes, recovery, degradation chain
│ └── security.md ← Privacy model, threat model, data classification
└── tests/
├── unit/
└── integration/
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.
- 2d ago First seen · 181 lines · 2,316 tokens per session scan A ec56a219b73b
cortex CLAUDE.md is an instructions file published in the GitHub repository gzoonet/cortex (21 stars, last pushed 4d ago), licensed MIT. It adds 2,316 tokens to every session, about $0.0116 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
remnic AGENTS.md
Instructions for joshuaswarren/remnic, covering remnic - agent guide, architecture boundaries (non-negotiable), upstream references, adapter implementation rules and openclaw compatibility window.
engraphis AGENTS.md
Instructions for Coding-Dev-Tools/engraphis, covering agents.md — engraphis, 0. read this first — two architectures live in one package, 1. commands, ── unified dashboard + memory inspector ── and 2. the v2 recall pipeline (where the real work is).
shodh-memory CLAUDE.md
Instructions for varun29ankuS/shodh-memory, covering shodh-memory project instructions, must rules, code standards, persistent memory (shodh-memory mcp) and codebase map.
llm-wiki-newsroom AGENTS.md
Instructions for alfadur7/llm-wiki-newsroom, covering llm wiki newsroom — schema & workflow instructions, how to use, directory layout, page format and ingest workflow.
llm-wiki-newsroom GEMINI.md
Instructions for alfadur7/llm-wiki-newsroom, covering llm wiki newsroom — schema & workflow instructions, how to use, directory layout, page format and ingest workflow.
engraphis CLAUDE.md
Instructions for Coding-Dev-Tools/engraphis, covering claude.md, the one rule that prevents most mistakes, before you say "done" — run the canonical gate, slash commands available here and working style in this repo.