Hooks
What metraton-gaia runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
$ npx -y skills add metraton/gaia --agent claude-codeShips with metraton-gaia. Installing the plugin gets these hooks.
What fires, and when
PreToolUse
- Runs pre_tool_use.py.
PostToolUse
- Runs post_tool_use.py.
SubagentStop
- Runs subagent_stop.py.
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.
- Runs session_start.py.
SessionEnd
- Runs session_end_hook.py.
PreCompact
- Runs pre_compact.py.
PostCompact
- Runs post_compact.py.
Stop
- Runs stop_hook.py.
TaskCompleted
- Runs task_completed.py.
SubagentStart
- Runs subagent_start.py.
UserPromptSubmit
Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.
- Runs user_prompt_submit.py.
ElicitationResult
- Runs elicitation_result.py.
Where it lives
- hooks/elicitation_result.pyGitHub
- hooks/post_compact.pyGitHub
- hooks/post_tool_use.pyGitHub
- hooks/pre_compact.pyGitHub
- hooks/pre_tool_use.pyGitHub
- hooks/session_end_hook.pyGitHub
- hooks/session_start.pyGitHub
- hooks/stop_hook.pyGitHub
- hooks/subagent_start.pyGitHub
- hooks/subagent_stop.pyGitHub
- hooks/task_completed.pyGitHub
- hooks/user_prompt_submit.pyGitHub
Showing the source of 6 of 12 scripts. Every one is linked above.
Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
Repo: metraton/gaia

