agent/google/gemini-cli/hooks/hooks.json
Snider ef63055b58 refactor: move Gemini CLI extension to google/gemini-cli
Restructure Gemini extension files that were incorrectly placed at repo
root. Updates script paths to reference shared claude/code/ scripts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:35:08 +00:00

58 lines
No EOL
2 KiB
JSON

{
"hooks": {
"PreToolUse": [
{
"matcher": "run_shell_command",
"hooks": [
{
"type": "command",
"command": "${extensionPath}/../../claude/code/hooks/prefer-core.sh"
}
],
"description": "Block destructive commands (rm -rf, sed -i, xargs rm) and enforce core CLI"
},
{
"matcher": "write_to_file",
"hooks": [
{
"type": "command",
"command": "${extensionPath}/../../claude/code/scripts/block-docs.sh"
}
],
"description": "Block random .md file creation"
}
],
"PostToolUse": [
{
"matcher": "replace_file_content && tool_input.TargetFile matches \"\\.go$\"",
"hooks": [
{
"type": "command",
"command": "${extensionPath}/../../claude/code/scripts/go-format.sh"
}
],
"description": "Auto-format Go files after edits"
},
{
"matcher": "replace_file_content && tool_input.TargetFile matches \"\\.php$\"",
"hooks": [
{
"type": "command",
"command": "${extensionPath}/../../claude/code/scripts/php-format.sh"
}
],
"description": "Auto-format PHP files after edits"
},
{
"matcher": "replace_file_content",
"hooks": [
{
"type": "command",
"command": "${extensionPath}/../../claude/code/scripts/check-debug.sh"
}
],
"description": "Warn about debug statements (dd, dump, fmt.Println)"
}
]
}
}