claude-code-best-practice hooks
From shanraisshan
Hooks on PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, PostToolBatch, UserPromptSubmit, UserPromptExpansion, Notification, MessageDisplay, Stop, SubagentStart, SubagentStop, PreCompact, PostCompact, SessionStart, SessionEnd, Setup, TeammateIdle, TaskCreated, TaskCompleted, ConfigChange, WorktreeCreate, WorktreeRemove, InstructionsLoaded, Elicitation, ElicitationResult, StopFailure, CwdChanged, FileChanged, PermissionDenied
Facts
- Repository
- shanraisshan/claude-code-best-practice
- Status
- Actively maintained
- Last commit
- Source file
- .claude/settings.json
Source preview
The instructions Claude Code reads when this hook runs.
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py",
"timeout": 5000,
"async": true,
"statusMessage": "PreToolUse"
}
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py",
"timeout": 5000,
"async": true,
"statusMessage": "PermissionRequest"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py",
"timeout": 5000,
"async": true,
"statusMessage": "PostToolUse"
}
]
}
],
"PostToolUseFailure": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py",
"timeout": 5000,
"async": true,
"statusMessage": "PostToolUseFailure"
}
]
}
],
"PostToolBatch": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py",
"timeout": 5000,
"async": true,
View full source on GitHub →Other hooks
ruflo hooks
★ 64,474Hooks on PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, Stop, Notification
ruvnetupdated 3mo agoMITclaude-code-templates hooks
★ 29,520Hooks on PreToolUse, PostToolUse, Notification, Stop
davila7updated 3mo agoMITbeads hooks
★ 25,299Hooks on PreToolUse
gastownhallupdated 3mo agoMITClaude-Code-Game-Studios hooks
★ 23,018Hooks on SessionStart, PreToolUse, PostToolUse, Notification, PreCompact, PostCompact, Stop, SubagentStart, SubagentStop
Donchitosupdated 4mo agoMIT