←back to thread

Claude Code now supports hooks

(docs.anthropic.com)
381 points ramoz | 1 comments | | HN request time: 0.397s | source
Show context
brynary ◴[] No.44429455[source]
This closes a big feature gap. One thing that may not be obvious is that because of the way Claude Code generates commits, regular Git hooks won’t work. (At least, in most configurations.)

We’ve been using CLAUDE.md instructions to tell Claude to auto-format code with the Qlty CLI (https://github.com/qltysh/qlty) but Claude a bit hit and miss in following them. The determinism here is a win.

It looks like the events that can be hooked are somewhat limited to start, and I wonder if they will make it easy to hook Git commit and Git push.

replies(3): >>44431303 #>>44433526 #>>44434020 #
1. BonoboIO ◴[] No.44433526[source]
Husky and lint-staged worked for me. Pre Commit Hooks did not work for me.