ccppccpp home

Hooks

CPO hooks

Hooksstable

One command on every Claude Code event, so CPO sees each prompt, tool call, subagent and end of turn.

Each hook runs `ccpp cpo hook` with a 30-second timeout. The ccpp CLI turns the hook into ordered CPO events and answers Claude Code with the outcome of your policies. Install ccpp first: the plugin's launcher runs the `ccpp` found on PATH.

Category
Guardrails
Ships with
Claude Policy Objects (cpo)
Documentation
/docs/plugins/cpo/events
Source
plugins/cpo/hooks/hooks.json

Install

Installing the cpo plugin installs this component too.

Add the marketplace (terminal)

claude plugin marketplace add CCPP-dev/CCPP

Install the cpo plugin (terminal)

claude plugin install cpo@ccpp

Read from source

Events (21)
SessionStart, UserPromptSubmit, UserPromptExpansion, PreToolUse, PermissionRequest, Elicitation, ElicitationResult, PostToolUse, PostToolUseFailure, PostToolBatch, SubagentStart, SubagentStop, TaskCreated, TaskCompleted, Stop, TeammateIdle, PreCompact, PreModelSwitch, PostModelSwitch, ConfigChange, WorktreeRemove

Verified at build

  • passSource plugins/cpo/hooks/hooks.json exists
  • passRegisters at least one event
  • passDocumentation page /docs/plugins/cpo/events exists