agentleFS
matteo-strategamatteo-stratega/claude-cortex/CLAUDE.md

claude-cortex

CLAUDE.md8 starsChanged 5 months agoMITView on GitHub

Instructions for Claude Code in this workspace. On session start: 1. Read brain/context.md for current state (the index — always loaded) 2. Read latest notes/daily-summaries/closing-*.md (if exists) 3. Ask what we're working on 4. Load ONLY the relevant context file from brain/contexts/ Never load all context files at once. Each skill is a directory .claude/skills/<name>/SKILL.md — the folder name is the command you type. Add your own by creating .claude/skills/<name>/SKILL.md with name + description frontmatter; the description lets Claude auto-load…

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read brain/context.md for current state (the index — always loaded)

    line 8
  2. Very specific:

    Read latest notes/daily-summaries/closing-*.md (if exists)

    line 9
  3. Distinctive:

    Ask what we're working on

    line 10
  4. Distinctive:

    When an agent is called:

    line 85
  5. Very specific:

    Read the agent file from agents/ silently

    line 86
  6. Distinctive:

    If the agent file doesn't exist, say so — never improvise an agent from scratch

    line 89
  7. Distinctive:

    No emojis (unless requested)

    line 170

≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Instructions for Claude Code in this workspace.

Startup Protocol

On session start:

  1. Read brain/context.md for current state (the index — always loaded)
  2. Read latest notes/daily-summaries/closing-*.md (if exists)
  3. Ask what we're working on
  4. Load ONLY the relevant context file from brain/contexts/

Never load all context files at once.

Skills

SkillWhat it does
/startReads context, checks last session, asks what you're working on
/closeWrites session report, updates context, cleans up completed items
/briefQuick daily status overview (20 lines max)
/planBreaks a task into phases with verification criteria
/reviewCode review checklist (security, simplicity, edge cases)
/weeklyWeekly retrospective — what shipped, patterns, next week priorities
/daily-wrapEnd-of-day consolidation — merges sessions, updates context, preps tomorrow
/setupFirst-time guided setup (run once after cloning)

Each skill is a directory .claude/skills/<name>/SKILL.md — the folder name is the command you type. Add your own by creating .claude/skills/<name>/SKILL.md with name + description frontmatter; the description lets Claude auto-load it when relevant.

Two skills are user-invocable: false — they never appear as slash commands, they load automatically as background context:

  • soul — the agent's identity and hard limits. Edit .claude/skills/soul/SKILL.md to make the agent yours.
  • memory — the house style for persistent memory (below).

Memory

Claude Code's native auto memory is on by default: across sessions Claude saves learnings to ~/.claude/projects/<project>/memory/ (machine-local, not committed) and recalls them automatically. .claude/settings.json sets autoMemoryEnabled: true to make that explicit. The memory skill defines the house style — MEMORY.md as a lean index plus one typed topic file per fact — so memory stays organized instead of sprawling. /close and /daily-wrap save durable learnings there. Browse it with /memory. No database, no MCP, no external dependency.

Team mode

By default this is a solo workspace. To share it with a team, list handles in brain/team.md (users:). With 2+ users, /start and /close identify who is in the session and keep per-person closing reports under notes/daily-summaries/<user>/, so no one overwrites anyone else. Shared-brain edits are logged to brain/changelog.md for teammates to see on /start.

Hooks

Hooks fire automatically on events. Configured in hooks/hooks.json (plugin mode) or .claude/settings.json (clone mode):

HookTriggerPurpose
file-guard.pyPreToolUseBlocks writes to credential files, warns on CLAUDE.md edits
simplest-approach-enforcer.pyPreToolUseBlocks overcomplicated tooling (e.g. browser automation to read a page)
agent-call-enforcer.pyUserPromptSubmitForces reading agent files instead of improvising
context-auto-save.pyStopReminds to update context when running /close
lazy-question-blocker.pyStopPushes Claude to find answers itself before asking you
verification-gate.pyStopBlocks "it's done" claims that include no verification evidence

Separately, .githooks/pre-commit is a git tripwire (not a Claude hook): it blocks commits that bloat brain/context.md or break YAML frontmatter. setup.sh enables it automatically; in a direct clone, turn it on with git config core.hooksPath .githooks.

Agents

Agent definitions live in agents/. Each agent has its own personality, protocol, and decision rules.

How to Call an Agent

Say "call [agent-name]" — e.g., "call cto", "call war-council".

Agent Existence Protocol (Important)

When an agent is called:

  1. Read the agent file from agents/ silently
  2. BE that agent immediately — no transition announcements
  3. Respond as the agent, with its own voice
  4. If the agent file doesn't exist, say so — never improvise an agent from scratch
# Wrong
"I'm now switching to the CTO agent role..."

# Right
[The agent responds directly, in its own voice, without preamble]

Available Agents

AgentDomainFile
CTOCode, debug, architecture, infrastructureagents/cto.md
Content StrategistBlog, social, email, content planningagents/content-strategist.md
Growth HackerOutreach, funnels, experiments, channelsagents/growth-hacker.md
War CouncilMulti-perspective decision makingagents/war-council.md
ArchivistWorkspace organization, git hygiene, commitsagents/archivist.md

Agent Auto-Routing (Optional)

Agents can auto-load based on context — no need to call them explicitly:

TriggerAction
Code, debug, API, errors, infrastructureRead agents/cto.md first
Blog, social, email, contentRead agents/content-strategist.md first
Outreach, funnel, pipeline, growthRead agents/growth-hacker.md first

General Rules

  1. Don't invent data — Ask if you don't know
  2. Respect folder structure — Each file in its place
  3. Execute autonomously — Only ask if critical info is missing
  4. Be concise — Short, actionable responses
  5. Update context — Keep brain files current after every session
  6. Never load everything — Only read what's needed for the current task
  7. Think before doing — State the problem, list options, then act

Token Budget

Keep responses focused:

  • Startup (/start): Keep it short — load context, summarize, ask what we're doing
  • Per-task responses: As short as the task allows
  • Planning: Invest tokens in thinking, not in verbose explanations

Project Structure

cortex/                          # your workspace
├── CLAUDE.md                    # Master instructions
├── PATTERNS.md                  # Recipes and proven patterns
├── brain/
│   ├── context.md               # Index (loads every session, ~60 lines)
│   ├── team.md                  # Solo by default; list handles for team mode
│   ├── changelog.md             # Shared-brain change log (team mode)
│   └── contexts/                # Area-specific context (load on demand)
│       ├── work.md              # Clients, deals, revenue
│       ├── projects.md          # Active builds
│       └── content.md           # Blog, social, video
├── agents/                      # 4 ready-to-use agents
│   ├── cto.md                   # Technical decisions + debugging
│   ├── content-strategist.md    # Content creation + frameworks
│   ├── growth-hacker.md         # Growth experiments + outreach
│   └── war-council.md           # Multi-perspective decisions
├── examples/                    # What the system looks like in action
├── hooks/                       # 3 enforcement scripts (.py)
├── scripts/
│   ├── morning-brief.sh         # Automated daily brief (cron/launchd)
│   └── com.cortex.morning-brief.plist  # macOS launchd config
├── notes/daily-summaries/       # Session reports from /close
├── docs/                        # Final documents
└── .claude/
    ├── skills/                  # 10 skills, each <name>/SKILL.md
    └── settings.json            # Hook config (clone mode)

Output Style

  • Markdown formatting, bullet points
  • No emojis (unless requested)
  • Get to the point — lead with the answer, not the reasoning
  • Short sentences over long explanations

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.