Skip to content
Productivity
Hook

Hooks

What pro-workflow runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
pro-workflow
2.9k41 skills8 agents23 commands24 hooks
Install
> /plugin marketplace add rohitg00/pro-workflow
> /plugin install pro-workflow@pro-workflow

Ships with pro-workflow. Installing the plugin gets these hooks.

What fires, and when

PreToolUse

  • Matchestool == "Edit" || tool == "Write"node "${CLAUDE_PLUGIN_ROOT}/scripts/quality-gate.js"node "${CLAUDE_PLUGIN_ROOT}/scripts/read-before-write.js"
  • MatchesReadnode "${CLAUDE_PLUGIN_ROOT}/scripts/reread-tracker.js"node "${CLAUDE_PLUGIN_ROOT}/scripts/read-before-write.js"
  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/tool-call-budget.js"
  • MatchesBashnode "${CLAUDE_PLUGIN_ROOT}/scripts/git-blast-radius.js"node "${CLAUDE_PLUGIN_ROOT}/scripts/pre-commit-check.js"node "${CLAUDE_PLUGIN_ROOT}/scripts/commit-validate.js"node "${CLAUDE_PLUGIN_ROOT}/scripts/pre-push-check.js"
  • Matchestool == "Edit" || tool == "Write"node "${CLAUDE_PLUGIN_ROOT}/scripts/secret-scan.js"

PostToolUse

  • Matchestool == "Edit" && tool_input.file_path matches "\\.(ts|tsx|js|jsnode "${CLAUDE_PLUGIN_ROOT}/scripts/post-edit-check.js"
  • Matchestool == "Bash" && tool_input.command matches "(npm test|pnpm tesnode "${CLAUDE_PLUGIN_ROOT}/scripts/test-failure-check.js"

Stop

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/session-check.js"
  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/learn-capture.js"

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/session-start.js"

SessionEnd

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/session-end.js"

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/prompt-submit.js"
  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/drift-detector.js"

PreCompact

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/pre-compact.js"

PostCompact

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/post-compact.js"

ConfigChange

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/config-watcher.js"

Notification

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/notification-handler.js"

SubagentStart

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/subagent-start.js"

SubagentStop

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/subagent-stop.js"

TaskCompleted

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/task-completed.js"

TaskCreated

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/task-created.js"

PermissionRequest

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/permission-request.js"

PermissionDenied

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/permission-denied.js"

PostToolUseFailure

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/tool-failure.js"

TeammateIdle

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/teammate-idle.js"

StopFailure

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/stop-failure.js"

FileChanged

  • Matches.env|.envrc|package.json|tsconfig.json|Cargo.toml|go.mod|pyprojenode "${CLAUDE_PLUGIN_ROOT}/scripts/file-changed.js"

Setup

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/setup-hook.js"

WorktreeCreate

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/worktree-create.js"

WorktreeRemove

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/worktree-remove.js"

CwdChanged

  • Matches*node "${CLAUDE_PLUGIN_ROOT}/scripts/cwd-changed.js"
Read hooks/hooks.json
Ships withpro-workflow

Claude Code learns from your corrections: self-correcting memory that compounds over 50+ sessions. Context engineering, parallel worktrees, agent teams, and 17 battle-tested skills.

Get the whole plugin