Skip to content
Development
Hook

Hooks

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

From plugin
cm
5362 skills8 agents11 commands3 hooks
+1
Install
> /plugin marketplace add tody-agent/codymaster
> /plugin install cm@codymaster

Ships with cm. Installing the plugin gets these hooks.

What fires, and when

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.

  • if [ -f .cm/CONTINUITY.md ]; then echo '[cm] Working memory loaded from .cm/CONTINUITY.md'; head -30 .cm/CONTINUITY.md; else echo '[cm] No .cm/CONTINUITY.md found. Run /cm:cm-start to initialize.'; fi

PreToolUse

  • MatchesWrite|Edit${CLAUDE_PLUGIN_ROOT}/bin/cm-guard-secrets

Stop

  • ${CLAUDE_PLUGIN_ROOT}/bin/cm-save-continuity
Read hooks/hooks.json
Ships withcm

"I can't write code. But in 6 months, I shipped 12 real products using AI. CodyMaster is everything I learned — so you don't have to repeat my mistakes." — Tody Le, Head of Product, Creator of CodyMaster 50+ skills. One install.

Get the whole plugin