←back to thread

Claude Code now supports hooks

(docs.anthropic.com)
381 points ramoz | 3 comments | | HN request time: 1.563s | 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 #
alfons_foobar ◴[] No.44431303[source]
Why is it that regular git hooks do not work with claude code?
replies(1): >>44433909 #
1. brynary ◴[] No.44433909[source]
When using Claude Code cloud, in order to create signed commits, Claude uses the GitHub API to create commits instead of the git CLI
replies(2): >>44434056 #>>44436365 #
2. ramoz ◴[] No.44434056[source]
Wdym Claude Code cloud? Like in a cloud env?
3. alfons_foobar ◴[] No.44436365[source]
Huh, I had not heard of claude code cloud before.

(Also almost swallowed my tongue saying that out loud)