allow me to introduce you to the lord and savior, https://pre-commit.com/
Agreed. Also Lefthook: https://github.com/evilmartians/lefthook
and if your pre-commit runs fast (thank you, ruff), you can set this up as a post-edit hook in claude code
Agreed. Also Lefthook: https://github.com/evilmartians/lefthook