Claude Hookbook

Testing hooks

Run tests and typechecks around edits and task completion.

Full check before task completion

Blocks Claude from marking a task completed while your project check fails.

TaskCompletedblocking riskneeds manual check

Run the nearest test after an edit

Finds the test file that belongs to the file Claude just edited and runs it, in the background.

PostToolUseEdit|Writereview riskneeds manual check

Typecheck after TypeScript changes

Runs tsc --noEmit in the background after Claude edits TypeScript, so type errors surface even when tests don't cover the file.

PostToolUseEdit|Writereview riskneeds manual check