cortex-core: Instructions file for Claude Code

CLAUDE.md

cortex-core CLAUDE.md is an instructions file for Claude Code from turfptax/cortex-core. It costs 2,992 tokens per session, scanned B, original, MIT.

A public project guide for Cortex Core, the code behind a personal AI memory system. It explains the project, tells new agents what to read first, and separates public code guidance from private personal data.

In plain words
What is it for?
Use it when working on Cortex Core, its memory layer, cloud migration, configuration, gateway, or SQLite-related code.
Why use it?
It helps agents understand the repository and avoid putting secrets or personal information into tracked files.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is turfptax/cortex-core's own configuration. It tells Claude Code how to work on cortex-core 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-core configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/turfptax/cortex-core/src/.

Reuse

Borrowing it

Nothing to install: this file belongs to turfptax/cortex-core. 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/turfptax/cortex-core/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/turfptax/cortex-core

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-core CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/turfptax/cortex-core/claude-md/github.svg)](https://agentmods.dev/instructions/turfptax/cortex-core/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/turfptax/cortex-core/claude-md"><img src="https://agentmods.dev/badge/instructions/turfptax/cortex-core/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-core CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/turfptax/cortex-core/claude-md"><img src="https://agentmods.dev/badge/instructions/turfptax/cortex-core/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,992 This file is loaded in full into every session.
When invoked 2,992 The same file — it is already loaded in full.
Security scan B 1 finding. 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.02992 $0.02992
Opus 5.5 $0.01197 $0.01197
Sonnet 5.5 $0.00598 $0.00598
Haiku 4.5 $0.00299 $0.00299

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

Security

Grade B, and why

cortex-core 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 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

ssh [email protected] "sudo mv /tmp/*.py /home/turfptax/cortex-core/src/ && sudo chown root:root /home/turfptax/cortex-core/src/*.py && sudo systemctl restart cortex-core"
CLAUDE.md · 228 lines

How it starts

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

Cortex Core — AI Agent Guide

THIS FILE IS COMMITTED AND PUBLIC. Never put real personal data, client or employer names, secrets, or private-life details in this file or any tracked file. All instance-specific values live in gitignored config (see SECURITY.md and the gitignored memory/core/*.md). When you need real context, read those gitignored files; do not bake their contents into tracked code or docs.

If you're an AI agent starting work in this repo, read this first.

ACTIVE DIRECTION (2026-07-14): cloud migration. Cortex is moving off the home Pi into Azure (one Container App per person; this core becomes the cloud engine, co-deployed with the gateway, single writer of the SQLite files). Read docs/CLOUD_MIGRATION.md before any core/deploy work. Near-term core tasks are P0 (env-externalize) and P1 (gateway reads the core SQLite), both local, no Azure needed.

What this repo is

Cortex Core is the Pi-side of Cortex, Tory Moghadam's personal AI memory system. The Python runtime lives in src/. The interpretive memory layer (overseer plugin) lives in plugins/overseer/.

Cortex serves three functions:

  • F1 — Serve digital data to future AIs for context (primary mission; the reason the system exists)
  • F2 — Tory's personal data-org software (Hub UI is on the cortex-desktop side, but the storage + interpretive layer lives here)
  • F3 — R&D testbed for AI maturation (sibling dispatch, B/C agents, dialectic, voice mode)

The mission was articulated by Tory in his own words 2026-05-26: "to save and process all my digital data for future serving to new AIs for context."

Boot sequence for new AIs (read in this order)

1. The agentic triangle — three identity files

memory/core/ holds three identity files defining the agents in the room:

File What
memory/core/USER.md Who Tory is. Gitignored — exists locally on this machine. If you can read it, do. If not, read example.USER.md for the structure + ask Tory for the actual file content.
memory/core/OVERSEER.md The memory-upkeep agent's identity. Gitignored. Same fallback.
memory/core/APP.md Cortex's self-description. Gitignored. Same fallback.
memory/core/example.*.md Public templates with placeholders — always tracked.
memory/core/README.md Explains the gitignore pattern.

Read the full file on GitHub · 228 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 · 228 lines · 2,992 tokens per session scan B a3c4240390ba

Subscribe to this mod's changes

cortex-core CLAUDE.md is an instructions file published in the GitHub repository turfptax/cortex-core (1 stars, last pushed 3mo ago), licensed MIT. It adds 2,992 tokens to every session, about $0.0120 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cortex-core CLAUDE.md compared with instructions from other repositories

cortex-core CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cortex-core CLAUDE.mdturfptax/cortex-coreInstructions file13mo agoMITB2,992Claude 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