Live data from Hacker News

Claude Code now supports hooks

docs.anthropic.com

131–140 of 184 posts

Re: Claude Code now supports hooks

#131
post #10

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 event…

FYI.

Claude loves Java.

I never have to reformat. It picks up my indentation preferences immediately and obeys my style guide flawlessly. When I ask it to perfect my JavaDoc it is awesome.

Must be a ton of fabulous enterprise Java in the training set.

Re: Claude Code now supports hooks

#132

Earlier quoted context omitted.

Why is it that regular git hooks do not work with claude code?

When using Claude Code cloud, in order to create signed commits, Claude uses the GitHub API to create commits instead of the git CLI

Wdym Claude Code cloud? Like in a cloud env?

Re: Claude Code now supports hooks

#133

I tried to make an app in claude code like they so much fanfare it could do, and it failed. It was obvious it will fail, I wanted something that I think it was not done before, using the Youtube api. But it failed nonetheless. I am tired of pretending that this can actually pull any meaningful work besides a debug companion or a slightly enhanced google/stackoverflow.

[deleted]

Re: Claude Code now supports hooks

#134

Earlier quoted context omitted.

You can’t use it across three repos like a workspace in Xcode?

It is all file based, so yes you can if you do what OP said: `git clone repo-one && git clone repo-two` and tell claude that repo-one directory is for example frontend, repo-two is backend (or better name the directories after what they are)

Exactly this, nothing fancy really.

Re: Claude Code now supports hooks

#138

As an aside, people say AI will eliminate coding jobs, but then who will configure these hooks? Or think about adding such a feature? These kinds of tooling and related work will still be there unless AI evolves to the point that it even thinks of this and announces this to all other AI entities and they also implement it properly etc.

To misuse a woodworking metaphor, I think we’re experiencing a shift from hand tools to power tools. You still need someone who understands the basics to get the good results out of the tools, but they’re not chiseling fine furniture by hand anymore, they’re throwing heaps of wood through the tablesaw instead. More productive, but more likely to lose a finger if you’re not careful.

When all you have is a hammer, everything looks like your thumb.

Re: Claude Code now supports hooks

#139
post #114

Earlier quoted context omitted.

And we may get an ugly transitory period where a lot of programs go from being clearly hand made with some degree of care and some fine details that show the developer's craftsmanship, to awful prefab and brutalist software that feels inhuman, mass-produced, and nothing is really fit for the job but still shipped because it kind of works well enough. People go to museums to admire old hand-carved furniture and travel…

I think it's going to go the opposite way: we'll get a lot more custom made software, that fits exactly what a small customer needs. The code might be utter crap, the design might not be award winning, but it will be custom made to a degree that you can't customize your average Savas.

This was the promise of "no code" / "low code" solutions in the past

It has never worked in the past, I'm not entirely convinced that it will work now

Re: Claude Code now supports hooks

#140
post #9
post #8

Exit Code 2 Behavior PreToolUse - Blocks the tool call, shows error to Claude This is great, it means you can set up complex concrete rules about commands CC is allowed to run (and with what arguments), rather than trying to coax these via CLAUDE.md. E.g. you can allow docker compose exec django python manage.py test but prevent docker compose exec django python manage.py makemigrations

You can already do this in .Claude/settings.json

That's limited to simple string matching with `*` so it can't handle anything complex.
Post reply on HN