Skip to content

Instantly share code, notes, and snippets.

@camwest
Created July 1, 2025 14:50
Show Gist options
  • Save camwest/6193871b87f9ceae4c6c28aa1c9aa0a7 to your computer and use it in GitHub Desktop.
Save camwest/6193871b87f9ceae4c6c28aa1c9aa0a7 to your computer and use it in GitHub Desktop.
Claude Code Hooks Configuration - PreToolUse and PostToolUse hooks setup
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./scripts/claude-branch-protection.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "./scripts/claude-code-quality.sh"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment