Skip to content
Agent Memory
Hook

Hooks

What mega-brain runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
mega-brain
1284 skills2 hooks
Install
> /plugin marketplace add guhcostan/claude-mega-brain
> /plugin install mega-brain@mega-brain

Ships with mega-brain. Installing the plugin gets these hooks.

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Matchesstartup|clear|compact"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" session-start

PostToolUse

  • MatchesRead"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" run-python "${CLAUDE_PLUGIN_ROOT}/scripts/inject-links.py"
Read hooks/hooks.json
Ships withmega-brain

Loads the knowledge. Skips the search. 100% accuracy · 0 tool calls · −66% tokens vs Obsidian+MCP Real agentic sessions. Benchmark →

Get the whole plugin
Stats
128
Stars
18
Forks
Maintained
Maintenance
Python
Language
MIT
License
3mo ago
Last commit
3mo ago
Created
7h ago
Added

Repo: guhcostan/claude-mega-brain