cortex: Instructions file for Claude Code

CLAUDE.md

cortex CLAUDE.md is an instructions file for Claude Code from gzoonet/cortex. It costs 2,316 tokens per session, scanned A, original, MIT.

A project instruction document for GZOO Cortex, a local-first tool that builds a searchable map of information from project files. It also describes the project's technology, structure, and rules, including its monorepo layout; a monorepo is one repository containing multiple related parts.

In plain words
What is it for?
It helps the agent understand Cortex's architecture, use its documented specifications, and follow the required conventions when editing the codebase.
Why use it?
It gives the coding agent the project context and development rules needed to make changes consistently.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is gzoonet/cortex's own configuration. It tells Claude Code how to work on cortex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cortex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gzoonet/cortex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gzoonet/cortex/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/gzoonet/cortex

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cortex CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gzoonet/cortex/claude-md/github.svg)](https://agentmods.dev/instructions/gzoonet/cortex/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/gzoonet/cortex/claude-md"><img src="https://agentmods.dev/badge/instructions/gzoonet/cortex/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cortex CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gzoonet/cortex/claude-md"><img src="https://agentmods.dev/badge/instructions/gzoonet/cortex/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,316 This file is loaded in full into every session.
When invoked 2,316 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02316 $0.02316
Opus 5.5 $0.00926 $0.00926
Sonnet 5.5 $0.00463 $0.00463
Haiku 4.5 $0.00232 $0.00232

Measured 2mo ago against content hash ec56a219b73b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

CLAUDE.md · 181 lines

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/

Read the full file on GitHub · 181 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. 2mo ago First seen · 181 lines · 2,316 tokens per session scan A ec56a219b73b

Subscribe to this mod's changes

cortex CLAUDE.md is an instructions file published in the GitHub repository gzoonet/cortex (24 stars, last pushed 5d ago), licensed MIT. It adds 2,316 tokens to every session, about $0.0093 per session on Opus 5.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.

Related

cortex CLAUDE.md compared with instructions from other repositories

cortex CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cortex CLAUDE.mdgzoonet/cortexInstructions file245d agoMITA2,316Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode