Optimize Claude Code sessions using a live knowledge graph: snapshot and inspect topology, generate consolidation recommendations, run autonomous Ralph Wiggum loops for tasks with quality gating, perform deep code reviews with PRs, track cost efficiency, and visualize dashboards for context intelligence and observability.
Structured experiment runner — define hypothesis, metric, and variations, then run automated eval loops with brainiac tracking
Direct interface to the Brainiac knowledge graph CLI
Open the Cortex knowledge graph dashboard in the browser
Deep code review, fix all issues, run tests, and create a PR in one pipeline
Dump the full Cortex knowledge graph topology for inspection
Analyzes the session knowledge graph for optimization opportunities. Spawned when quality score drops below 60, after compaction events, or when user asks for deep context analysis. Runs in isolated context to avoid consuming main window tokens.
Dedicated agent for knowledge graph hygiene — consolidation, pruning, and structural optimization. Spawned for periodic maintenance tasks or when the cortex-advisor identifies cleanup opportunities. Can write to the knowledge directory only.
Generator-evaluator pattern: independent QA agent that grades Claude's actual work output. Spawned after each Ralph iteration and after each run-tasks subagent. Evaluates the diff, runs tests, checks for known antipatterns from the knowledge graph. Returns a structured score (0-100) across 5 dimensions. Tuned to be skeptical — flags real issues, not cosmetic nits.
Admin access level
Server config contains admin-level keywords
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Modifies files
Hook triggers on file write and edit operations
Modifies files
Hook triggers on file write and edit operations
Uses power tools
Uses Bash, Write, or Edit tools
Uses power tools
Uses Bash, Write, or Edit tools
A Claude Code plugin that gives Claude improved memory, context intelligence, and session observability. Three modules working together:
| Module | Language | What it does |
|---|---|---|
| Brainiac | Python | Semantic knowledge graph with local embeddings, auto-linking, and intent-aware retrieval |
| Cortex | TypeScript | Hook processor that tracks sessions + MCP server with 5 dashboard tools |
| ContextScore | Python | 7-dimension context quality scoring with snapshot/recovery |
Built on research from A-MEM (NeurIPS 2025), MAGMA (2026), SmartSearch (Derehag et al. 2026), LCM (Ehrlich 2026), and Anthropic Harness Design (2025).
# From your project directory:
claude plugin add github:Peaky8linders/claude-cortex
# Or clone and install manually:
git clone https://github.com/Peaky8linders/claude-cortex.git
cd claude-cortex
pip install -e . # Python dependencies (brainiac + contextscore)
cd cortex && npm install && npm run build # TypeScript dependencies (cortex engine + MCP server)
After install, the plugin auto-registers:
/learn, /hypothesis, /cortex-status, /review-and-ship, etc.Claude forgets everything between sessions. Cortex doesn't. Use /learn at the end of a session to capture patterns, decisions, and solutions into a knowledge graph. Next session, Claude automatically searches the graph and applies what it learned.
Query your session in real-time via 5 MCP tools:
| Tool | What it shows |
|---|---|
cortex_token_timeline | Minute-by-minute token usage with spike detection and cost estimates |
cortex_activity_map | Gantt-like timeline of which hooks, skills, and tools fired |
cortex_quality_heatmap | 7-dimension radar chart of context quality (semantic relevance, redundancy, economics, etc.) |
cortex_graph_explorer | Interactive force-directed graph visualization (JSON for terminal, HTML for browser) |
cortex_dashboard | Unified session dashboard — KPIs, charts, cost breakdown, and knowledge graph in one page |
When Claude's context window compacts, critical decisions and patterns are lost. Cortex snapshots them before compaction and re-injects them after — lossless context management.
| Level | Command | What it does |
|---|---|---|
| L3 | /run-tasks | Execute task YAML with generator-evaluator pattern and sprint contracts |
| L4 | /ralph-start | Autonomous loop with dual quality gate and optional context resets |
| L5 | /auto-research | Structured experiment runner with /hypothesis tracking and eval loops |
Inspired by Anthropic's harness design research: separating work production from assessment is more effective than self-evaluation.
--reset-strategy reset) provides clean-slate iterations with structured handoffs for long-running tasksnpx claudepluginhub peaky8linders/claude-cortexEU AI Act compliance toolkit for Claude Code — validate citations against the canonical 113-article + 13-annex catalog, query the four-axis agentic compound-risk taxonomy, look up role obligations, and run the LLM-as-Judge reward-hack detector on proposed remediation tasks. Wraps the `specter` Python package as a local stdio MCP server + slash-command set; no hosted backend required.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Standalone image generation plugin using Nano Banana MCP server. Generates and edits images, icons, diagrams, patterns, and visual assets via Gemini image models. No Gemini CLI dependency required.
Write feature specs, plan roadmaps, and synthesize user research faster. Keep stakeholders updated and stay ahead of the competitive landscape.