Problem: AI generates code that doesn't match our formatting and linting...
Problem: AI generates code that doesn't match our formatting and linting standards.
Solution: Create a stop hook that runs Prettier and ESLint after edit.
I told Claude to put the hook's content in a Node script instead of an inline command. Then it's easy to document and read.


You might think "Why not just put an instruction in AGENTS .md or CLAUDE md?
Because this is fully reliable. The LLM can't ignore this and I have complete control over when this should fire.