Hooks
What cc-best runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
> /plugin marketplace add xiaobei930/cc-best > /plugin install cc-best@cc-best
Ships with cc-best. Installing the plugin gets these hooks.
What fires, and when
PreToolUse
- Matches
Bashnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/validate-command.js" - Matches
Bashnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/pause-before-push.js" - Matches
Bashnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/check-secrets.js" - Matches
Write|Editnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/protect-files.js" - Matches
Writenode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/block-random-md.js" - Matches
Bashnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/long-running-warning.js"
PostToolUse
- Matches
Write|Editnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/format-file.js" - Matches
Write|Editnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/auto-archive.js" - Matches
Write|Edit|Bashnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/observe-patterns.js" - Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/suggest-compact.js" - Matches
Write|Editnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/check-console-log.js" - Matches
Write|Editnode "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/typescript-check.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/node/hooks/user-prompt-submit.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/node/hooks/session-check.js"
Stop
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/stop-check.js"
SubagentStop
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/subagent-stop.js"
PreCompact
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/pre-compact.js"
PostCompact
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/post-compact.js"
PostToolUseFailure
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/post-tool-failure.js"
Notification
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/notification-handler.js"
SubagentStart
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/subagent-start.js"
SessionEnd
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/evaluate-session.js"
PermissionRequest
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/permission-request.js"
PermissionDenied
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/permission-denied.js"
InstructionsLoaded
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/instructions-loaded.js"
FileChanged
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/file-changed.js"
CwdChanged
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/cwd-changed.js"
ConfigChange
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/config-change.js"
MessageDisplay
node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/message-display.js"
TaskCompleted
- Matches
.*node "${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/task-completed.js"
Role-Driven Development Workflow for Claude Code Transform Claude into a complete development team. From product requirements to code review — one plugin, full workflow. Quick Start • Features • Workflow • Commands • FAQ
Repo: xiaobei930/cc-best

