Automates bash commands and file modifications before and after specific tool usage and at session start.
/plugin marketplace add jeffweiss/elixir-production/plugin install elixir-production@jeffweissDefined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Before writing/editing this Elixir code, verify: 1) Are typespecs needed for public functions? 2) Is error handling explicit with tagged tuples ({:ok, value} / {:error, reason})? 3) Are tests required for new functionality? Only proceed if yes, or explicitly document why not (e.g., SPIKE mode).",
"timeout": 30
}
],
"matcher": "Write:*.ex|Write:*.exs|Edit:*.ex|Edit:*.exs"
},
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/enforce-precommit.sh",
"blocking": true,
"description": "Enforces mix precommit before any git commit or push. BLOCKING — commit will not proceed until all checks pass."
}
],
"matcher": "Bash:git commit*|Bash:git push*"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/quick-validate.sh",
"blocking": false,
"description": "Quick validation of edited Elixir files (compile + format check). Non-blocking."
}
],
"matcher": "Edit:*.ex|Edit:*.exs|Write:*.ex|Write:*.exs"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"async": false,
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/session-start.sh"
}
],
"matcher": "startup|resume|clear|compact"
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 1,
"command": 3
},
"eventStats": {
"PreToolUse": 2,
"PostToolUse": 1,
"SessionStart": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 3,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 3
}
}