One command gives Claude Code full project context — git history, risk scores, PR decisions, security notes. Generated from your actual code, not written by hand.
The problem
You end up explaining context that should just exist.
The solution
Cortex analyzes your repository once and writes .claude/docs/ — a structured knowledge base Claude Code reads automatically.
It extracts what matters: bug patterns from git history, architectural decisions from PR discussions, risk scores, security issues.
Not hand-written documentation. Actual project history.
What it does
Scans every commit that touched a file. Bug fixes, refactors, regressions — all mapped to the files that caused them.
Every file gets a score based on bug history, test coverage, churn rate, and dependency depth. HIGH / MEDIUM / LOW. Claude Code sees it before touching anything.
Mines GitHub PR comments for architectural decisions. "We chose Redis because…", "Don't cache this endpoint — caused prod outage". Knowledge that lives nowhere in the code.
Per-file SAST analysis. Hardcoded secrets in git history, SQL injection patterns, vulnerable dependencies. Results in context, not a separate report.
Every context file shows when it was generated and how many commits happened since. ⚡ Fresh / ⚠️ Stale / ❌ Outdated. You know if the context can be trusted.
Run cortex mcp and add one line to .claude/settings.json. Context is injected automatically — no manual file reading required.
See it in action
Get started
One command. No configuration needed.
Run in your project directory. Takes 30–120 seconds. Writes .claude/docs/ with context for every source file.
Context travels with your repo. Everyone on the team benefits immediately.
Ready?
Stop re-explaining your codebase every session. Run Cortex once and commit the result.
curl -fsSL https://raw.githubusercontent.com/kovalenko-tech/cortex/main/install.sh | bash