Hooks
What writ runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
> /plugin marketplace add infinri/Writ > /plugin install writ@writ
Ships with writ. 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.
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-blackbox-capture.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/session-start-bootstrap.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.
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-manual-test-grant.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/auto-approve-gate.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-rag-inject.sh
SubagentStart
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-subagent-start.sh
SubagentStop
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-blackbox-capture.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-subagent-stop.sh
Stop
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/friction-logger.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/enforce-violations.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-verify-before-claim.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-run-pending-tests.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-comms-output-gate.sh
PostToolUseFailure
- Matches
.*bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-blackbox-capture.sh
PreCompact
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-precompact.sh
PostCompact
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-blackbox-capture.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-postcompact.sh
SessionEnd
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-session-end.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-pressure-audit.sh
CwdChanged
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-blackbox-capture.shbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-cwd-changed.sh
PreToolUse
- Matches
ExitPlanModebash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-exit-plan.sh - Matches
Readbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-read-junk-gate.sh - Matches
Readbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-read-rag.sh - Matches
Grep|Read|Globbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-debug-code-gate.sh - Matches
Write|Edit|NotebookEditbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-state-write-gate.sh - Matches
Write|Edit|NotebookEditbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-pre-write-dispatch.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/pre-validate-file.sh - Matches
Taskbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-dispatch-discipline.sh - Matches
Bashbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-worktree-safety.sh - Matches
Bashbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-bash-write-gate.sh - Matches
Writebash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-test-file.sh - Matches
Writebash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-design-doc.sh - Matches
Writebash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-memory-policy-guard.sh
PostToolUse
- Matches
Bashbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/inject-tier-workflow.sh - Matches
WebFetch|WebSearchbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-web-capture.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-file.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-bible-authoring-push.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-handoff.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-rules.sh - Matches
Write|Edit|NotebookEditbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-posttool-rag.sh - Matches
Writebash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-quality-judge.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-mark-pending-test.sh - Matches
Write|Editbash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/writ-memory-capture.sh
A Claude Code harness that enforces engineering discipline at the moment the AI acts, and delivers the rules that fit the work in front of it.

