Skip to content
Development
Hook

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.

Install
$ npx -y skills add xiaobei930/cc-best --agent claude-code

Ships with cc-best. Installing the plugin gets these hooks.

What fires, and when

PreToolUse

  • Runs validate-command.js".

PostToolUse

  • Runs format-file.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.

  • Runs 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.

  • Runs session-check.js".

Stop

  • Runs stop-check.js".

SubagentStop

  • Runs subagent-stop.js".

PreCompact

  • Runs pre-compact.js".

PostCompact

  • Runs post-compact.js".

PostToolUseFailure

  • Runs post-tool-failure.js".

Notification

  • Runs notification-handler.js".

SubagentStart

  • Runs subagent-start.js".

SessionEnd

  • Runs evaluate-session.js".

PermissionRequest

  • Runs permission-request.js".

PermissionDenied

  • Runs permission-denied.js".

InstructionsLoaded

  • Runs instructions-loaded.js".

FileChanged

  • Runs file-changed.js".

CwdChanged

  • Runs cwd-changed.js".

ConfigChange

  • Runs config-change.js".

MessageDisplay

  • Runs message-display.js".

TaskCompleted

  • Runs task-completed.js".
Read hooks/hooks.json
Ships withcc-best

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

Get the whole plugin, auto-invoked
Stats
49
Stars
0
Views
3
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
1mo ago
Last commit
6mo ago
Created

Repo: xiaobei930/cc-best