Skip to content
Development
Hook

Hooks

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

From plugin
craft
6811 skills27 agents62 commands7 hooks
+1
Install
> /plugin marketplace add drobins25/craft
> /plugin install craft@craft

Ships with craft. 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.

  • ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/session-start.sh
  • Matchescompact${CLAUDE_PLUGIN_ROOT}/hooks/scripts/post-compact-reinject.sh

PostToolUseFailure

  • python3 ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/handle-tool-failure.py

PostToolUse

  • MatchesWrite|Editpython3 ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/update-progress.py

PreToolUse

  • MatchesWrite|Editpython3 ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/check-write-permission.py
  • MatchesWrite|Editpython3 ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/check-craft-vocab.py
  • MatchesBash${CLAUDE_PLUGIN_ROOT}/hooks/scripts/auto-approve-plugin-scripts.sh
  • MatchesBash${CLAUDE_PLUGIN_ROOT}/hooks/scripts/push-gate.sh

PreCompact

  • ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/export-progress.sh

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.

  • ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/inject-craft-context.sh

Stop

  • ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/stop-hook-guard.sh
Read hooks/hooks.json

In the plugin's words

How craft describes its own hook set.

Craft plugin hooks — creative-first development harness with progress tracking, write permission gating, and session lifecycle management
Ships withcraft

Stop Vibing. Start Crafting. A Claude Code plugin that acts as an intelligent harness for your development workflow: your codebase is read-only by default, every change passes through a Write Gate as planned and approved work, and craft tracks your project's

Get the whole plugin, auto-invoked