By Cain-Ish
Self-evolving AI second brain. Automatically learns from sessions, discovers tools, maintains a local knowledge base, and self-critiques code quality — getting smarter with every interaction.
Reviews a change against its git history to find the regression bug class that diff-only review misses: changes that revert or re-introduce a previously-fixed bug, or contradict the historical reason a line exists. Runs once over the changed code files using git blame/log. Dispatched by the code-review-deep skill (Pass 2c) alongside the per-unit reviewers. <example> Context: code-review-deep has decomposed a PR and is fanning out reviewers. assistant: "Dispatching code-review-history-reviewer to blame-walk the changed code for reverts and re-introduced bugs." </example>
Reviews a change for unproven RUNTIME PREMISES — load-bearing assumptions about the environment (env vars, files, process state, shared state, services, platform) that the diff depends on but does not itself establish. The bug class diff-static review misses: code internally consistent with a false belief about the runtime. Runs once over the changed code files. Dispatched by the code-review-deep skill (Pass 2d). <example> Context: code-review-deep has decomposed a change and is fanning out reviewers. assistant: "Dispatching code-review-premise-reviewer to enumerate unproven runtime premises." </example>
Scores a single code-review finding on a 0–100 confidence scale by verifying it against the actual files, and suppresses findings that match a known false-positive pattern. Dispatched (one per unique finding) by the code-review-deep skill to filter false positives before posting. <example> Context: code-review-deep collected findings from per-unit reviewers and needs to filter noise. assistant: "Scoring each finding with code-review-scorer, suppressing any that match a recorded false positive." </example>
Deep-reviews a single review unit (a group of related changed files) within a GitHub change. Reads every file in the unit, diffs each against the base, follows cross-file imports, and applies a diff-scoped bug taxonomy focused on runtime-affecting bugs — especially cross-file interaction bugs that breadth-only review misses. Dispatched in parallel (one per unit) by the code-review-deep skill. <example> Context: code-review-deep has decomposed a PR into review units and is fanning out. assistant: "Dispatching code-review-unit-reviewer per unit to hunt cross-file bugs in parallel." </example>
Background dream execution agent. Runs the transcript mining + 7-phase wiki consolidation cycle (incl. SUMMARIZE + FORGET) on a staging copy of the wiki. Dispatched by the dream skill in --background mode. Mutates only the staging directory; the FORGET phase reads the live wiki read-only to score real page ages and writes a forget-manifest — actual archiving happens only on dream_accept. <example> Context: User ran /second-brain:dream --background which created drm_20260511T143022Z. assistant: "Spawning dream-runner agent to consolidate the knowledge base in the background." </example>
Show what the second-brain safety layer did this session — every PreToolUse guard verdict, every tool-return injection flag, every wiki-write decision. Reads ~/.second-brain/audit-log.jsonl produced by hooks. Read-only.
Drop unprocessed material (a file, a URL, or pasted text) into the current project's raw inbox for later refinement into wiki notes. Usage: /second-brain:capture <path|url> | "<text>" | --list | --discard <id> | --node <slug>.
In-depth multi-pass code review of a GitHub change (local checkout). Decomposes the diff into logical review units, reviews each on the best available model (docs on the Haiku model), runs an advisory architectural pass on the highest-risk units, scores findings with an FP-aware scorer, consults the second-brain for conventions and prior reviews, and records false positives. Local output by default; --comment posts to the PR.
Adversarial validation of the second-brain plugin. Questions architectural layers from a position of maximum skepticism, drilling from general to granular. Rotates focus across runs using git-change priority, history rotation, and perspective variety so different questions are asked each time.
Run a "dream" — background consolidation of the knowledge base. Mines session transcripts for missed insights, deduplicates wiki entries, builds cross-links, and stages all changes for review before applying. Equivalent to Anthropic's managed-agents Dreams API, running locally. Supports inline (default) and background (--background) execution modes.
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.
This plugin requires configuration values that are prompted when the plugin is enabled. Sensitive values are stored in your system keychain.
knowledge_dirWhere to store your local knowledge base (wiki pages, embeddings, raw sources). Default: ~/knowledge
${user_config.knowledge_dir}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
Companion plugin: the discipline skills (brainstorming, TDD, systematic-debugging, writing-plans, verification-before-completion) come from the upstream obra/superpowers plugin (>= 5.1.0) — no longer vendored since 0.24.42 (see NOTICE.md). The second-brain works without it; install it for the full workflow loop.
| Skill | Purpose |# Second Brain — Hot-Tier Memory + Local Wiki for Claude Code
A Claude Code plugin that gives Claude a two-layer memory: a small hot tier (USER.md + projects/<slug>/PROJECT.md) auto-loaded at every SessionStart, and a larger local wiki retrievable on demand. The plugin extracts decisions, blockers, and cross-references from each session via Stop/PreCompact LLM hooks and merges them into the hot tier and wiki. You can still pin manually; the auto-extraction layer surfaces candidates so you don't have to remember to.
Auth requirement: the extractor calls the Anthropic API. You can use either an ANTHROPIC_API_KEY (token plan, works everywhere) or a Claude subscription via claude /login (OAuth, with a known in-session limitation — see Auth modes). All knowledge stays on your machine; nothing is uploaded except the extraction prompts themselves.
At SessionStart, the plugin reads ~/.second-brain/USER.md and the project-scoped projects/<slug>/PROJECT.md (slug derived from git remote or repo path) and emits them into context. These two files are intentionally short — durable preferences and project facts only. The full wiki stays on disk and is retrievable via /second-brain:query.
Three MCP tools — pin_to_user, pin_to_project, archive_to_wiki — let Claude (or you) write a fact into the right tier. Pins are append-with-dedupe; the user confirms each pin before it lands. The /second-brain:improve skill proposes up to 3 candidate pins from the current session's evidence and waits for your approval.
Longer-form notes, sources, and past sessions live in a local wiki, cross-linked so related ideas connect. Claude searches it on demand and gets sharper results when an optional on-device model is present — but it all works offline, and nothing leaves your machine.
At the end of a session (and before a context compaction), the plugin quietly captures what mattered — decisions made, problems hit, things worth reusing — and files them into the right place. Memory builds up on its own, so you don't have to remember to save anything. You can still pin facts by hand whenever you want.
Related notes are linked into a lightweight knowledge graph, so Claude can follow "what depends on what." Each note also carries a short machine-readable summary so an AI can grasp it without re-reading the prose. Over time a consolidation pass merges duplicates and retires stale notes — always reversibly, never a hard delete.
/second-brain:import-host finds AI-context files you already keep (CLAUDE.md, AGENTS.md, .cursorrules, and repo-local equivalents) and folds their contents into the right tier — preferences, project facts, or longer notes.
In Claude Code, add the marketplace then install the plugin:
/plugin marketplace add Cain-Ish/claude-code-plugin
/plugin install second-brain@second-brain
First run:
/second-brain:setup
Then pick an auth mode (see Auth modes below) and check it:
sb auth status
The plugin runs LLM extraction (Stop/PreCompact hooks, persona advisor) against the Anthropic API. Two paths are supported and the plugin auto-detects which one you're on:
| Mode | How you enable it | Works in-session? | Works in cron/CI? |
|---|---|---|---|
| API key (token plan) | export ANTHROPIC_API_KEY=sk-ant-... | yes | yes |
| Subscription (OAuth) | claude /login (interactive browser flow) | queued — see note | yes |
| none | neither set | nothing extracts; banner warns at session start | — |
Why subscription mode queues in-session: A Stop/PreCompact hook fires from
inside a Claude Code session, so spawning claude -p from the hook re-enters
the same OAuth-locked process and reliably hangs to the timeout. The plugin
detects this and short-circuits to status=queued instead of burning the
timeout. To enable in-session extraction on a Claude subscription, either
also export an ANTHROPIC_API_KEY (preferred — the API key path doesn't go
through OAuth at all) or run extraction out-of-band via cron/systemd-timer.
npx claudepluginhub cain-ish/claude-code-plugin --plugin cost-routerHarness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Superpowers Plus core skills library for Claude Code: planning, execution routing, TDD, debugging, and collaboration workflows
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Browser automation and end-to-end testing MCP server by Microsoft. Enables Claude to interact with web pages, take screenshots, fill forms, click elements, and perform automated browser testing workflows.
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.