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 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>
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>
This skill should be used when a problem class has appeared 2+ times across sessions — escalates recurring patterns up through the memory tier hierarchy.
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.
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Uses power 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.
Uses Bash, Write, or Edit tools
Uses Bash, Write, or Edit tools
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. It only activates in projects you explicitly opt in (see Activation).
gh) — optional, but needed for the Sensory system (CI/PR checks)No Python, no jq, no flock — the hook path is bash + POSIX awk only. (jq/python3 are used as optional accelerators when present.)
claude plugins marketplace add Undercurrent-Studio/undercurrent-cortex
claude plugins install cortex@undercurrent-studio
Restart Claude Code. All 7 hook events register natively from the plugin's hooks.json — nothing is written into your ~/.claude/settings.json.
Cortex is fully inert until you opt a project in: in a project without the sentinel file .claude/cortex/enabled, every hook exits immediately with {} — zero files created, zero state written.
/cortex:setup once in the project. It creates the sentinel and validates the workspace. A new session is required for activation. This is the ONLY activation path (the old grandfathering auto-activation was deleted in the calibration wave — a pre-4.0 project stays inert until you run setup)..claude/cortex/enabled (or the whole .claude/cortex/ directory).All 7 events live in the plugin's hooks.json and dispatch natively. The bootstrap era is fully deleted (calibration wave): the settings.json injection workaround for a since-fixed platform bug, its cleanup script, and the per-session suppression marker are all gone — deletion happened only after verifying, at deletion time, that no settings file anywhere still carried a bootstrap-era hook entry.
Cortex runs in one of two experimental conditions (all hooks fire regardless; the condition gates behavior inside them — this backs the Core/Lab experiment the calibration wave was built for):
| Condition | Behavior |
|---|---|
lab (default) | Core plus the frozen adaptive tier: synthesis tasks, health pulse and trend, interventions (commit nudge, re-edit warning, journal checkpoint, codex reminder), keyword context injection, sensory scan, social patterns |
core | The control: event recording, carry-over, and blocking protection gates ONLY. Zero adaptive output — a core session emits no nudges, warnings, injections, or health display (test-enforced) |
Legacy profile names alias: minimal→core, standard/strict→lab (strict's TDD deny is retired). 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.
npx claudepluginhub crombieman/undercurrent-cortex --plugin cortex(Alpha) Persistent memory, architectural decisions, and safety guardrails for Claude Code. Your agent starts every session with full project context — stack, decisions, patterns, safety rules, and a handoff from the previous session.
Automatic context engineering — observes your coding sessions and generates rules, suggestions, skills, and hooks so Claude gets smarter on your codebase over time
Governor: always-on compact professional output, telemetry, context slimming, tool-output filtering, prompt guidance, and drift guardrails for Claude Code Max users.
Persistent local memory for Claude Code. Cross-session recall with vector search, automatic archiving, zero cloud dependencies.
Persistent memory system for AI coding sessions — cross-tool memory sharing with 6-dimensional hybrid search
Corca Workflow Framework — consolidated hooks and skill orchestration for structured development sessions