← All notes
Active November 2026

Hooks: automatic actions

Hooks are commands the app runs by itself on certain events. Mine keep my memory in sync, guard the servers and the secrets, check Python and block a bad push.

Claude CodeHooks

What a hook is

A hook is a shell command configured in the settings that the app runs on its own when something happens: a session starts, a tool is about to run, a task ends. The difference from a note in memory is important: a memory is something Claude should remember, a hook is something that will happen, whether it remembers or not.

The ones I have

The global configuration, the skills and these scripts now live in a private repository, so they restore on a new Mac with a clone.

What I would add

My usage report spotted commits whose message did not follow my format: a hook that checks it before the commit would be a small script. Another candidate is a reminder to update the memory at the end of a long session. Neither is in place yet.

A word of caution

A hook runs with my permissions and without asking, so it should be short, readable and boring. The best ones I can think of do one thing and say so in a log.