Skip to content
Development
Hook

Hooks

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

From plugin
gearbox
105 agents2 commands4 hooks
Install
> /plugin marketplace add Adityaraj0421/gearbox
> /plugin install gearbox@gearbox

Ships with gearbox. Installing the plugin gets these hooks.

What fires, and when

PreToolUse

  • MatchesTask|Agentpython3 "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/log-escalation.py"

PostToolUse

  • MatchesTask|Agentpython3 "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/log-routing.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.

  • python3 "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/inject-routing.py"

SubagentStop

  • python3 "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/log-verdict.py"
Read hooks/hooks.json
Ships withgearbox

Gearbox is a Claude Code plugin that automatically routes subagent delegations to the cheapest model tier that can handle the work — haiku for search and mechanical edits, sonnet for standard implementation, opus for hard architectural problems.

Get the whole plugin
Stats
10
Stars
3
Forks
Maintained
Maintenance
Python
Language
MIT
License
1mo ago
Last commit
3mo ago
Created

Repo: Adityaraj0421/gearbox