By crombieman
Compounding intelligence system for Claude Code - session management, health tracking, context injection, and adaptive learning
Run the conversation analyzer agent for a full adaptive immunity scan — detects corrections in today's journal, classifies patterns, writes lessons, and generates evolution proposals
Launch a structured 3-pass code review — bug/logic, security, and project conventions analysis with confidence scoring
Interactively scaffold a new Cortex skill with proper structure, frontmatter, and context-flow wiring
Run the memory-synthesis agent to curate collaboration patterns, workflows, and project file organization
Launch an exhaustive deep-dive research session on any topic — competitors, markets, technology, codebase, ideation
Use this agent for structured code review with three focused analysis passes: (1) Bug/logic, (2) Security, (3) Project conventions. Reads CLAUDE.md, lessons.md, and documentation.md for project-specific rules. Produces findings with confidence scores, filtered to high-confidence results (>=80), deduped by file+line. Triggers on phrases like "review my code", "code review", "review this branch", "review the diff", "check this PR", "review before merge". Examples: <example> Context: User wants a review of recent changes user: "Review the code I just wrote" assistant: "I'll use the code-reviewer agent to perform a 3-pass analysis of your changes." <commentary> Standard code review — the agent gets the git diff, then runs bug/logic, security, and conventions passes, producing a consolidated findings report. </commentary> </example> <example> Context: User wants a review of a specific file user: "Code review src/lib/pipeline/scoring.ts" assistant: "I'll use the code-reviewer agent to analyze scoring.ts through all three review lenses." <commentary> Targeted file review — the agent reads the specified file and runs all three passes against it. </commentary> </example> <example> Context: User wants to review before merging user: "Review everything on this branch before we merge" assistant: "I'll use the code-reviewer agent to review all changes on this branch." <commentary> Branch review — the agent runs git diff against the base branch to capture all changes, then reviews through all three passes. </commentary> </example>
Use this agent when analyzing a session for correction events, pattern detection, and system evolution proposals. Reads session journals and lessons, detects mistakes, classifies patterns, and writes proposals. Examples: <example> Context: Session-end detected 2+ correction events or 1+ reasoning-miss in today's journal user: "Run the conversation analyzer" assistant: "I'll use the conversation-analyzer agent to perform a full adaptive immunity scan of today's session." <commentary> Session-end found multiple reasoning misses, triggering the adaptive immunity analysis to extract lessons and propose system improvements. </commentary> </example> <example> Context: User wants to manually review session quality user: "/analyze-session" assistant: "I'll launch the conversation-analyzer agent to analyze today's journal for corrections, patterns, and evolution opportunities." <commentary> User explicitly invoked the analyze-session command, which triggers this agent. </commentary> </example> <example> Context: Session-start surfaced degrading health trend user: "Health metrics are degrading, let's figure out what's going wrong" assistant: "I'll use the conversation-analyzer agent to scan recent sessions and identify recurring patterns causing the degradation." <commentary> Degrading health trend warrants a full adaptive immunity scan to find root causes and propose fixes. </commentary> </example>
Use this agent for exhaustive research, investigation, or comparison on any substantial topic — competitor analysis, market research, live product testing, technical deep dives, codebase investigation, concept learning, ideation, or self-auditing. Triggers on phrases like "research X", "deep dive on X", "compare X vs Y", "investigate X", "look into X", "what are the options for X", "analyze X". Produces comprehensive written reports with strategic recommendations. Examples: <example> Context: User wants to understand the competitive landscape user: "Do a deep dive on all the SaaS platforms competing with us" assistant: "I'll use the deep-dive agent to conduct an exhaustive competitive analysis." <commentary> Market/competitor research — the agent will search the web, visit competitor sites via browser, analyze pricing/features/positioning, and produce a strategic report. </commentary> </example> <example> Context: User wants to audit their own product user: "Deep dive into our live product and tell me what's broken or could be better" assistant: "I'll use the deep-dive agent to conduct a thorough self-audit of the live product." <commentary> Self-audit — the agent will visit the live site via browser, test flows, screenshot issues, and produce a findings report with prioritized recommendations. </commentary> </example> <example> Context: User wants to learn about a new technology user: "I need to understand everything about vector databases" assistant: "I'll use the deep-dive agent to produce a comprehensive research report on vector databases." <commentary> Deep learning — the agent will research the topic exhaustively from primary sources, compare options, and produce an actionable knowledge report. </commentary> </example> <example> Context: User wants to explore a new product direction user: "Research whether adding options flow data would be valuable for our users" assistant: "I'll use the deep-dive agent to investigate the opportunity." <commentary> Ideation/opportunity research — the agent will research the space, existing products, data sources, user demand signals, and produce a strategic assessment. </commentary> </example> <example> Context: User wants to compare specific tools or technologies user: "Compare Koyfin vs TradingView vs Stockanalysis — features, pricing, UX, target audience" assistant: "I'll use the deep-dive agent to do a thorough competitive comparison." <commentary> Head-to-head comparison — the agent will visit each product via browser, analyze features/pricing/UX, build comparison matrices, and produce a strategic assessment. </commentary> </example> <example> Context: User wants to investigate something in the codebase end-to-end user: "Investigate our data pipeline — trace the full flow, find bottlenecks, tell me what's inefficient" assistant: "I'll use the deep-dive agent to trace the pipeline architecture and produce an efficiency report." <commentary> Codebase investigation — the agent will read CLAUDE.md and documentation.md for context, then trace code paths, analyze patterns, and produce a findings report. </commentary> </example>
Use this agent when the user wants to curate, organize, or review synthesis memory files (collaboration patterns and reusable workflows). Reads all files in ~/.cortex/synthesis/, performs dedup/merge/reorganize/flag operations, syncs index files, and flags archive candidates across the project's file system. Triggers on phrases like "curate memory", "curate synthesis", "organize files", "clean up memory", "review collaboration patterns", "review workflows". Examples: <example> Context: User wants to clean up synthesis files user: "Curate my memory files" assistant: "I'll use the memory-synthesis agent to scan collaboration patterns and workflows for duplicates, staleness, and reorganization opportunities." <commentary> User explicitly requested memory curation, triggering the synthesis curator agent. </commentary> </example> <example> Context: Session-start suggested curation (10+ sessions since last run) user: "Sure, go ahead and curate" assistant: "I'll use the memory-synthesis agent to run a full curation pass." <commentary> Session-start flagged that curation was due, user approved the suggestion. </commentary> </example> <example> Context: User wants to review what collaboration patterns have been captured user: "What collaboration patterns do we have?" assistant: "I'll use the memory-synthesis agent to read and summarize the current collaboration patterns." <commentary> User wants visibility into the synthesis tier content. Agent reads and presents it. </commentary> </example>
This skill should be used when the user asks to "display data", "add a chart", "show a number", "create a data component", "fix wrong data", "debug null values", "add a pipeline source", "handle data freshness", "fix stale cache", or before any code that displays, transforms, or stores data in the current project. Enforces 'every number must be accurate and traceable.'
This skill should be used before writing any Supabase or PostgREST query — 8 gotchas that cause silent failures.
This skill should be used on-demand before deploying to production — 13-item pre-deploy verification checklist. Trigger when the user says "deploy", "push to production", "ship it", "go live", "deploy readiness check", "ready to deploy", "release to prod", or "merge to master".
This skill should be used when starting any feature, significant change, or architectural decision — sets quality bar, sequences design before implementation.
This skill should be used to generate a Mermaid diagram of the reference file knowledge graph from See Also metadata — visual navigation aid for the reference tree.
Uses power tools
Uses Bash, Write, or Edit tools
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.
A Claude Code plugin that works like a living organism — 13 biological systems that learn, adapt, protect, and evolve across your coding sessions.
Imagine a second brain sitting alongside Claude that:
now() in a Postgres migration)All of this happens through bash hooks that fire at specific moments in your Claude Code session.
gh) — optional, but needed for the Sensory system (CI/PR checks)claude plugins marketplace add Undercurrent-Studio/undercurrent-cortex
claude plugins install cortex@undercurrent-studio
Restart Claude Code. On first session start, the plugin bootstraps all hook events into your global ~/.claude/settings.json automatically.
Cortex uses a two-tier hook dispatch system due to a known bug where plugin hooks.json command hooks are unreliable for most events:
| Tier | Location | Events | Why |
|---|---|---|---|
| hooks.json | Plugin manifest | SessionStart only | Proven working; serves as the bootstrap's lifeline |
| Global settings.json | ~/.claude/settings.json | PreToolUse, PostToolUse, PreCompact, Stop, SessionEnd, UserPromptSubmit | Bootstrapped on every session start; the only location proven to reliably fire hooks |
The bootstrap-hooks.sh script runs on every SessionStart and:
~/.claude/settings.json (idempotent — skips if already correct)settings.local.jsonAll bootstrapped entries are tagged with "_cortex_bootstrap": true for identification.
Cortex supports three hook profiles that control which systems are active:
| Profile | Events Injected | Use Case |
|---|---|---|
standard (default) | All 6 events | Full organism — recommended for most projects |
minimal | PreToolUse, PostToolUse, SessionEnd only | Lightweight — enforcement + state tracking only |
strict | All 6 events + proposals auto-surfaced | Full organism with more aggressive adaptation |
Set via CORTEX_PROFILE env var or .claude/cortex/profile.local file in your project.
Think of the plugin as a body. Each system has a specific job, and they work together.
These fire every session and handle the basics.
1. Nervous System — State Tracking Every edit, commit, and tool call gets counted in a session-scoped state file. The nervous system is how the organism "feels" what's happening — it's the raw sensory data that other systems read.
Where: post-dispatch.sh (universal counter), post-edit-dispatch.sh, post-bash-dispatch.sh
State: edits_since_last_commit, commits_count, tool_calls_count, [files_modified] section
2. Immune System — Dangerous Operation Blocking Before certain tools execute, the immune system checks if the operation is safe. If not, it blocks it with an explanation.
Examples of what gets blocked:
now() or CURRENT_DATE in a migration file (PostgreSQL requires IMMUTABLE functions in partial indexes)Where: pre-dispatch.sh routes to migration-linter.sh + plan-file-guard.sh + tdd-guard.sh
npx claudepluginhub crombieman/undercurrent-cortex --plugin cortexMulti-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
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.
Memory compression system for Claude Code - persist context across sessions
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.