Claude Hookbook

Formatting hooks

Run formatters on files right after Claude edits them.

ESLint after JS/TS edit

Runs eslint --fix on JavaScript and TypeScript files after Claude edits them, and warns (never blocks) on remaining problems.

PostToolUseEdit|Writereview riskneeds manual check

gofmt after Go edit

Runs gofmt -w on Go files after Claude edits them.

PostToolUseEdit|Writelow riskneeds manual check

Prettier after edit

Runs Prettier on any JS/TS/JSON/CSS/Markdown file right after Claude edits it.

PostToolUseEdit|Writelow riskneeds manual check

Ruff after Python edit

Runs ruff check --fix on Python files after Claude edits them.

PostToolUseEdit|Writelow riskneeds manual check

rustfmt after Rust edit

Runs rustfmt on Rust files after Claude edits them.

PostToolUseEdit|Writelow riskneeds manual check