Claude Code plugin · v1.28.0
Your Claude Code keeps forgetting. Brainy gives it a second brain.
Lost context between sessions. No persistent memory. Knowledge that goes nowhere. Broken task continuity. Brainy fixes the things every Claude Code user fights — with lifecycle hooks, sane settings, and deep integrations with the tools you already use.
- 17
- skills
- 31
- hooks
- 10
- CC events
- 6
- agents
Why your Claude Code needs it
Claude Code is brilliant and amnesiac. Brainy is the cure.
Brainy is the orchestration layer between Claude Code and a structured Obsidian vault. Every friction point below is something it fixes automatically — no commands to remember, the hooks just fire.
Context dies between sessions
Close the terminal and yesterday's work is gone. You re-explain the project every morning.
SessionStart hooks auto-load the active session note, branch, and recent transcript so Claude resumes where you left off.
No persistent memory
Claude relearns your preferences, decisions, and conventions every single time.
A file-based memory layer plus a UserPromptSubmit reminder makes Claude search what it already knows before it guesses.
Knowledge goes nowhere
Good decisions and research evaporate into a transcript you'll never read again.
Sessions export to an Obsidian PARA vault and get indexed in QMD — searchable forever, by you and by the agent.
Task continuity breaks
What was I doing? Which branch? What's blocked? Multi-session work falls apart.
Beads tracks issues with dependencies and mirrors them to TaskNotes and the live todo list — three-way synced, survives compaction.
17 skills
A slash command for every part of the workflow
Skills are invocable capabilities Brainy ships into Claude Code. Click any card to see exactly when it triggers — no need to read the plugin source.
31 hooks · 10 events
The lifecycle: every Claude Code event, wired
Brainy registers hooks across all 10 Claude Code lifecycle events. This is its spine — the automation that runs whether or not you remember to ask. Expand an event to see exactly what fires.
SessionStartA Claude Code session begins (startup, resume, clear, or after a compaction).8 hooks⌄
ensure-obsidian.jsstatus msgDetects the OS-specific Obsidian path and launches the app if it is not running, polling until the vault CLI responds; a clean no-op when Obsidian is already up.
reinject-after-compact.jscompactOn a post-compaction SessionStart, re-injects the critical context captured by the pre-compact snapshot so work survives compaction.
session-auto-track.jsIn a recognized code project, finds or auto-creates the session note under 2. Areas/Sessions/<Project>/, detects the git branch, and injects the active note plus recent transcript context.
settings-viewer/generate.mjsasyncRegenerates the Brainy settings + usage-analytics dashboard HTML without blocking session start.
check-beads-init.jsIn a genuine code project, nudges to initialize beads (auto-runs `bd init` when .beads is missing); stays completely silent in a vault / non-code session.
beads-work-surface.jsstatus msgSurfaces the ready / in-progress beads queue (and a TUI banner) at session start for a genuine code session only.
check-git-init.jsDetects whether the project has git and guides initialization, degrading gracefully when git is absent rather than failing.
check-testing-setup.jsNudges toward the recommended testing stack when no test setup is present; silent once testing is configured.
UserPromptSubmitEvery time the user submits a prompt, before the model processes it.2 hooks⌄
memory-reminder.jsInjects the persistent-memory reminder so prior sessions and vault knowledge are searched before the model assumes or guesses.
beads-nudge.jsReminds the agent to track code work in beads whenever a codebase is present at or above the cwd.
PreToolUseBefore a tool call runs — used here to gate git pushes.2 hooks⌄
check-no-main-push.jsBashBlocks pushes to main/master before they happen, enforcing the branch-first workflow.
if: Bash(git push *)
branch-name-check.jsBashValidates the branch name against the feature/ fix/ chore/ convention when pushing.
if: Bash(git push *)
PostToolUseAfter a tool call completes — drives the beads/TaskNotes/session mirrors.9 hooks⌄
memory-index-sync.jsWriteKeeps the MEMORY.md index in sync whenever a memory file is written.
session-note-nudge.jsWrite|Edit|BashNudges to append progress and decisions to the active session note after meaningful work.
statusline-state.jsWrite|Edit|BashasyncUpdates the status-line state with current session and beads information.
commit-cadence-nudge.jsBashasyncAfter a beads issue is closed, nudges to commit at a healthy cadence.
if: Bash(bd close *) || Bash(bd update * --status closed)
beads-claim-to-branch.jsBashasyncWhen a beads issue is claimed, creates or switches to a matching feature branch.
if: Bash(bd update * --claim) || Bash(bd claim *)
beads-status-sync.jsBashasyncMirrors beads state changes into TaskNotes in the vault so tasks stay three-way synced.
if: Bash(bd *)
beads-todo-reminder.jsBashEmits a reminder to mirror the bd state change into the live todo list the user sees.
if: Bash(bd create *) || Bash(bd update * --claim) || Bash(bd update * --status *) || Bash(bd close *)
beads-dashboard-refresh.jsBashasyncRefreshes the beads dashboard after any bd command.
if: Bash(bd *)
mtn-to-beads-sync.jsBashasyncSyncs TaskNotes (mtn) completions back into beads to close the task-mirror loop.
if: Bash(mtn complete *) || Bash(mtn done *)
StopThe agent finishes responding (turn ends) — session wind-down checks.5 hooks⌄
session-auto-close.jsAuto-updates the active session note on stop, extracting goal and outcome from the transcript.
session-export-qmd.jsasyncExports the session transcript to an Obsidian markdown recap and re-indexes it in QMD.
session-stop-check.jsVerifies the session note was updated and nudges if progress or decisions were not logged.
beads-stop-check.jsChecks for open / in-progress beads issues at stop and reminds to close completed work.
task-completion-check.jsChecks for unfinished tracked tasks before the turn ends.
SessionEndThe Claude Code session terminates.1 hook⌄
session-end.jsasyncFinalizes and closes the session at SessionEnd as part of the session lifecycle.
PreCompactImmediately before Claude Code compacts the conversation context.1 hook⌄
pre-compact-snapshot.jsSnapshots critical context (goal, decisions, open work) before compaction so it can be restored afterward.
PostCompactImmediately after a compaction completes.1 hook⌄
post-compact.jsReinjects the pre-compact snapshot after compaction so the agent keeps its working context.
TaskCreatedA Claude Code task is created.1 hook⌄
task-created-check.jsReconciles a newly created Claude Code task with beads tracking.
TaskCompletedA Claude Code task is marked complete.1 hook⌄
task-completed-check.jsReconciles a completed Claude Code task with its corresponding beads issue.
See it run
Brainy, working — in five real scenarios
These are scripted replays of what Brainy actually emits. Pick a scenario; watch the hooks fire.
Context injection + session auto-track on SessionStart.
How it works
One orchestration layer between the agent and your brain
Brainy doesn't replace Claude Code or Obsidian — it wires them together so the lifecycle events you already produce turn into durable, searchable knowledge.
Claude Code
The agent. Emits 10 lifecycle events as you work.
Brainy
Orchestration layer. Hooks listen to every event; skills add commands; agents do focused jobs.
Obsidian PARA vault
Durable second brain. Sessions, projects, decisions, memory — all structured markdown.
External systems
- QMD — Semantic + BM25 search over the whole vault — how recall finds prior work.
- beads — Dolt-backed issue tracker with dependencies; survives compaction.
- TaskNotes — Vault-native task records, three-way synced with beads + the live todo list.
Scripts (6) · Monitors (1)
- beads-dashboard.js — Renders the beads work dashboard (configurable projects root).
- prd-audit.mjs — Validates every PRD's frontmatter, project backlink, status sets, and acceptance-criteria count.
- prd-seed.mjs — Parses a PRD's Acceptance Criteria into beads issues with priorities and milestone labels; idempotent once seeded.
- qmd-wrapper.mjs — Wrapper around QMD search (BM25 / semantic / deep query) over the vault.
- tasknotes.mjs — TaskNotes CLI bridge for creating/completing/listing vault tasks.
- vault-query.mjs — Structured vault/session lifecycle queries and per-project context aggregation.
- hook-watcher — Hook diagnostics — surfaces errors from brainy hook scripts as Claude notifications.
Agents (6)
Focused subagents Brainy can dispatch for heavier vault jobs.
- daily-plannerhaiku
Runs the morning or evening ritual for the vault owner
- knowledge-researchersonnet
Searches the vault from multiple angles and synthesizes what is known about a topic
- project-onboardersonnet
Creates the full vault presence for a new project or client engagement
- vault-compileinherit
Process unprocessed Inbox items into structured wiki notes
- vault-curatorsonnet
Expert at organizing the Obsidian vault using PARA methodology
- vault-lintinherit
Vault health audit and healing. Finds stale sessions, unprocessed Inbox items, missing note sections, orphaned projects, and recurring themes that should become wiki articles. Run periodically or when the vault feels messy.
Give your Claude Code a memory.
Brainy is a free, open Claude Code plugin. Install it once and the lifecycle hooks do the rest.
/plugin install brainy@hamch-pluginsGet Brainy on GitHub →