claude-cortex

agent
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Pass
  • Code scan — Scanned 8 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This project acts as an operating system and workspace template for Claude Code. It provides persistent memory, specialized agents, automated skills, and enforcement hooks tailored for solo developers managing multiple projects.

Security Assessment
Overall risk: Medium. The tool executes shell commands and modifies your local file system by design. The code scan of 8 files found no dangerous patterns, malware, or hardcoded secrets, and it does not request explicitly dangerous permissions. However, there are significant concerns with the installation methods. The one-click setup scripts instruct your machine to automatically download and run remote code directly from GitHub (`curl | bash` and `irm | iex`). While normal for many open-source projects, this practice inherently bypasses local review. You should always read the `setup.sh` and `setup-windows.ps1` scripts before executing them.

Quality Assessment
The project is actively maintained, with its most recent push occurring today. It is properly licensed under the permissive MIT standard. The developer provides excellent documentation, including video walkthroughs and detailed blog posts explaining the architecture. The primary drawback is extremely low community visibility. With only 5 stars on GitHub, the codebase has not been widely scrutinized by the open-source community, meaning potential bugs or security edge cases likely remain undiscovered.

Verdict
Use with caution — while the code itself appears clean and actively maintained, the low community validation and remote script installation require you to manually verify the setup files before integrating this into your daily workflow.
SUMMARY

Cortex — an operating system for Claude Code. Persistent memory, specialized agents, smart skills, enforcement hooks.

README.md

Cortex

An operating system for Claude Code.
Persistent memory, specialized agents, auto-loading skills, enforcement hooks.

License Stars Last Commit

Video Walkthrough · Blog Part 1 · Blog Part 2


This is the skeleton. You add the muscle.

I use this exact architecture to run my solo consultancy — 9 projects, 160+ tasks shipped, 36 agents. The repo is the business. Full story here.

Prerequisites: Node.js (LTS) + Python 3 + Claude Code (Pro $20/mo or Max $100/mo)

Install

Two ways to use Cortex, depending on what you want.

As a Claude Code plugin (capabilities only)

Drop the agents, skills, and hooks into any project:

/plugin install matteo-stratega/claude-cortex

You get the 4 agents, 7 skills, and 3 hooks. Your existing project stays as-is. No workspace scaffolding, no brain system — just the capabilities.

As a full workspace template (recommended for solo builders)

Clone the repo and fill in your own context. This is the full setup — brain, context files, session loop, morning brief.

git clone https://github.com/matteo-stratega/claude-cortex.git cortex
cd cortex
claude
/setup

/setup walks you through filling in your context in about 5 minutes.

One-liner install (Mac/Linux)
curl -fsSL https://raw.githubusercontent.com/matteo-stratega/claude-cortex/main/setup.sh -o setup.sh
bash setup.sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/matteo-stratega/claude-cortex/main/setup-windows.ps1 | iex

What's Inside

cortex/
├── CLAUDE.md                    # Master instructions (routing, rules, structure)
├── PATTERNS.md                  # Recipes and proven patterns
├── brain/
│   ├── context.md               # Index — loads every session (~60 lines)
│   └── contexts/                # Area-specific context (loaded on demand)
│       ├── work.md              # Clients, deals, revenue
│       ├── projects.md          # Active builds
│       └── content.md           # Blog, social, video
├── agents/                      # 4 ready-to-use agents
│   ├── cto.md                   # Think > Plan > Execute, debugging protocol
│   ├── content-strategist.md    # Framework-first writing, voice rules
│   ├── growth-hacker.md         # ICE scoring, funnel audits
│   └── war-council.md           # Multi-perspective decision making
├── examples/                    # What it looks like in action
│   ├── context-filled.md        # Brain after 2 weeks of real use
│   ├── closing-report.md        # What /close generates
│   └── war-council-output.md    # War council decision example
├── 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/                  # 7 skills
    ├── hooks/                   # 3 enforcement hooks
    └── settings.json            # Hook config

How It Works

Brain — Modular Context

Your context is split into an index (loads always, ~60 lines) and area files (loaded on demand).

Why? One monolithic context file means Claude processes your deal pipeline when you're writing a blog post. Splitting it cuts noise and improves output quality.

Rule: never load all context files at once.

Agents — AI Personalities

Agents are markdown files with distinct personalities, protocols, and decision rules. Say "call [name]" to activate one.

Agent What It Does
CTO Think > Plan > Execute. 5-step debugging protocol. Evaluates dependencies before installing.
Content Strategist Framework-first writing (PAS, AIDA, Hook-Story-Offer). Self-critique before publishing. Voice rules that kill AI-sounding copy.
Growth Hacker ICE scoring for experiments. Funnel audits. Experiment templates with hypothesis + success criteria.
War Council Three perspectives on any decision: Operator (speed), Strategist (long-term), Critic (failure modes). One clear recommendation.

Each agent has hard limits and decision rules. They don't just answer differently — they think differently.

See it in action: Check examples/war-council-output.md for a real War Council decision.

Skills — Smart Commands

Skill What it does
/setup First-time guided onboarding — fills in your context in 5 minutes
/start Reads context, checks last session, asks what you're working on
/close Writes session report, updates context, cleans up completed items
/brief Quick daily status overview — priorities, blockers, key numbers (20 lines)
/plan Breaks any task into phases with verification criteria
/review Code review checklist — security, simplicity, edge cases
/weekly Weekly retrospective — what shipped, time patterns, next week priorities

Add your own: drop a markdown file in skills/.

Hooks — Invisible Enforcement

Hooks fire on events. You don't invoke them. They just run.

Hook Trigger Purpose
file-guard.py PreToolUse Blocks writes to .env, credentials, key files. Warns on CLAUDE.md edits.
agent-call-enforcer.py UserPromptSubmit Forces reading agent files instead of improvising
context-auto-save.py Stop Reminds to update context when running /close

Morning Brief — Automated Daily Status

Run your brief on autopilot. The script calls Claude non-interactively, reads your context, and generates a 20-line status report.

# Run manually
./scripts/morning-brief.sh

# Cron (every day at 8:30 AM)
crontab -e
30 8 * * * cd /path/to/cortex && ./scripts/morning-brief.sh

# macOS launchd (edit paths in the plist first)
cp scripts/com.cortex.morning-brief.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.cortex.morning-brief.plist

Output goes to notes/daily-summaries/brief-YYYYMMDD.md and stdout.

Examples

The examples/ folder shows what the system looks like after real use:

  • context-filled.md — A brain/context.md after 2 weeks, with real priorities, metrics, and tech stack
  • closing-report.md — What /close generates: TL;DR, files modified, key decisions
  • war-council-output.md — A real War Council deliberation on "should I launch a free tier?"

Patterns & Recipes

Read PATTERNS.md — a reference guide covering:

  • Context patterns (60-line rule, snapshot principle, context layering)
  • Agent patterns (agent vs protocol, decision tables, War Council pattern)
  • Skill patterns (structure, auto-loading, chaining)
  • Hook patterns (types, templates, ideas for custom hooks)
  • Session patterns (the session loop, multi-session days, weekly rhythm)
  • Common mistakes and how to avoid them
  • Scaling up (MCP integrations, local AI, multiple projects)

What I Built With This

This isn't a demo. It's the architecture behind a real business:

  • Online academy (auth, admin dashboard, 7 email automations, real students)
  • Fashion trend analysis pipeline (my dad runs it, one command)
  • Competitive intelligence system (7 agents research prospects before calls)
  • CRM cleanup (450 → 74 companies in one afternoon)
  • 3 websites deployed
  • Prospecting pipelines (research → verify → enrich → CRM)
  • Newsletter + content production system

36 agents. 6 MCP integrations. 25 auto-loading skills. 3 enforcement hooks. ~$100/mo.

Customization

Add a brain module
  1. Create brain/contexts/your-area.md
  2. Add it to the routing table in brain/context.md
  3. Add a matching row to the /start skill routing table
Create an agent
  1. Create agents/your-agent.md
  2. Include: Identity, Personality, Core Protocol, Decision Rules, Hard Limits
  3. Add it to the agents table in CLAUDE.md
  4. Call it with "call [agent-name]" in any session

Tips:

  • "Professional" means nothing. "Direct, no filler, never says 'great question'" means something.
  • Give it decision rules, not just personality. "When X happens, do Y."
  • Hard limits prevent the agent from doing things you'll regret.
  • The test: Does this agent need its own personality that would conflict with another? If yes, agent. If no, it's a protocol inside an existing agent.
Add a skill
  1. Create skills/your-skill.md
  2. Structure: Step 1 → Step 2 → Step 3 → Output format → Rules
  3. Call it with /your-skill in any session

Skills work best with: clear steps, a specific output format, and rules for edge cases.

Add a hook
  1. Write a Python script in hooks/
  2. Read stdin (JSON), write stdout (JSON with continue: true/false and optional message)
  3. Add it to .claude/settings.json under the right trigger
  4. Available triggers: PreToolUse, PostToolUse, UserPromptSubmit, Stop

Start with warnings (permissive) before blocks (restrictive). See PATTERNS.md for hook templates and ideas.

Add local AI (Ollama)
brew install ollama
ollama pull mistral:7b-instruct
ollama run mistral:7b-instruct

Use for: batch classification, large document summarization, tasks that don't need Claude's full reasoning.

Troubleshooting

Xcode Command Line Tools (Mac)
xcode-select --install
Permission Error (EACCES) on Mac
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

Learn More


Built by Matteo Lombardi — solo growth operator, building in public.

MIT License — Use it, modify it, share it.

Reviews (0)

No results found