Add a PostToolUse hook in `.claude/settings.json` that runs after edits. ```json { "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "{{command}}" }] } ] } } ``` Set `{{command}}` to your formatter/linter (e.g. `npx prettier --write "$CLAUDE_FILE_PATHS"`). The hook's stdout/stderr is fed back to the model as feedback — make failures loud and actionable.