u/marksterberlin

Do you actually use hooks in Claude Code?

Genuine question, because the answer keeps surprising me. I'll be talking to folk at AI events in Berlin this week who really knows Claude Code — CLI, MCP, subagents, etc — and I'll ask what hooks they run and where. Almost all go quiet, or mumble about things that are not hooks at all. So few have ever set one up, some most have never heard of them (though you might have seen Claude suggesting them at some point in conversation, and ignored it - like me at first).

So if that's you: a hook is a small script the harness runs for you, automatically. On every prompt, on things the model does, when it stops. You write a rule once and it runs whether the model likes it or not. They're right there in the docs, but almost nobody I talk to actually uses them.

(now as a warning, just because they are there, does not mean Claude will listen! that's for another post)./

A concrete example, because "hooks are useful" means nothing on its own.

The first hook I set up — on Claude's own suggestion, while I was tinkering with my setup — catches the model talking about work in calendar time. I absolutely cannot stand Claude quoting me human time for things - "this'll take 3 hours... 2 weeks, blah blah". The only honest unit for AI work, being very direct, is tokens (and how close to your limits you are running), so the hook spots that phrasing and makes it redo the line.

In fact, as I was drafting this in Claude playing with some data, it fired on me while I was writing this post, which amused me.

I've added more since. Some catch obvious mistakes before they happen, some keep an eye on what a session is costing, some just enforce my own habits. Every one took fiddling. None of them worked clean on the first go.

That's really all I've got. Just trying to start a conversation. If you're deep in Claude Code: do you run any hooks? Which ones, and where do they actually earn their keep? And if you don't — never came up, or you tried and bounced off?

reddit.com
u/marksterberlin — 15 hours ago
▲ 19 r/SunoAI+1 crossposts

For those interested, there is an AI song competition, AI.LOVE.JAZZ, tied to the Montreux Jazz Festival. It’s the first global AI JAZZ contest, plus panel sessions. My submission “ADD Jazz” just got shortlisted! https://www.instagram.com/reel/DXhKE4ljOCn/?igsh=MXd2dTJiNXE4dDUwMA== > you can stoll submit entries https://ailovejazz.com - best of luck!

[Jazztronica] “ADD Jazz” by [mwizard] > My entry on Suno - https://suno.com/s/DrjIBamwQT4nFRtx

Artist site is https://mwizard.live in case that’s interesting too

reddit.com
u/Double-Ad-4640 — 25 days ago