npx claudepluginhub gonzaloserrano/gopilot --plugin gopilotDefined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/go-precommit.sh",
"timeout": 120
}
],
"matcher": "Bash"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/go-postwrite.sh",
"timeout": 10
}
],
"matcher": "Edit|Write"
}
]
}"Bash hooks for safe tool use: PreToolUse guards EnterPlanMode, Bash (pre-commit-check, destructive/workspace-lock, pre-push-review), Write/Edit (large-file, principle-inject). PostToolUse Bash nudges/compaction. Blocks risky ops, touches files."