Hooks
Event-driven scripts that run automatically at points in the Claude Code lifecycle.
What are you trying to do?
PreToolUse
PreToolUsecan blockPostToolBatch
PostToolBatchcan blockPermissionDenied
PermissionDeniedobservesSessionStart
SessionStartobservesStop
Security guidance plugin — pattern-based warnings on edits, git-diff-based LLM review on stop
Stopcan blockPostToolUse
Hookify plugin - User-configurable hooks from .local.md files
PostToolUseobservesSessionEnd
PostHog LLM Analytics + permission gating for write commands via mcp__posthog__exec
SessionEndobservesPostToolUse (Edit|Write|MultiEdit|NotebookEdit)
Security guidance plugin — pattern-based warnings on edits, git-diff-based LLM review on stop
PostToolUsecan blockPreToolUse (mcp__(.*[Cc]arta.*|2827383e-1775-4df3-b6ff-04d5392f6d18|640916d9-5e0c-4d0b-830a-03500fa93e5e|1af3c326-9402-463c-ba5c-d62de59cf57b|8eb65db0-0cbd-4f50-833b-3057c150d41a|33b9b857-8443-4b2d-b191-2d9b6c50eb86)__.*)
PreToolUsecan blockConfigChange
ConfigChangeobservesPreToolUse (__exec$)
PostHog LLM Analytics + permission gating for write commands via mcp__posthog__exec
PreToolUsePostToolUse (mcp__(.*[Cc]arta.*|2827383e-1775-4df3-b6ff-04d5392f6d18|640916d9-5e0c-4d0b-830a-03500fa93e5e|1af3c326-9402-463c-ba5c-d62de59cf57b|8eb65db0-0cbd-4f50-833b-3057c150d41a|33b9b857-8443-4b2d-b191-2d9b6c50eb86)__execute_query)
PostToolUsecan blockUserPromptSubmit
UserPromptSubmitobservesPreToolUse (Edit|Write)
PreToolUsecan blockSessionEnd
SessionEndobservesStop
Ralph Loop plugin stop hook for self-referential loops
Stopcan blockPreToolUse (Grep|Bash)
PreToolUseUserPromptSubmit
Security guidance plugin — pattern-based warnings on edits, git-diff-based LLM review on stop
UserPromptSubmitcan blockUserPromptSubmit
Databricks plugin hooks: route Databricks prompts into the skills, prime session context, and hint on auth failures.
UserPromptSubmitcan blockPostToolUse (Write|Edit|Bash)
PostToolUsecan blockSessionStart (*)
Output.ai framework session initialization
SessionStartobservesStop
Stopcan blockPreToolUse (Bash)
PreToolUsecan blockUserPromptExpansion (^claude-security:claude-security$)
A display-only banner: on the /claude-security menu it prints the Claude Security banner as a systemMessage. It fires only on UserPromptExpansion for that slash command. It is a sensor: it emits a message and never returns a permission decision.
UserPromptExpansionobserves