One Claude Code feature I was underusing: hooks
I used to put a lot of rules in CLAUDE.md like “run the formatter after edits” or “don't touch this file” and just trust Claude to follow them.Turns out some of that probably shouldn't be an instruction at all.Claude Code has hooks that can run automatically at different points in a session. So you can do things like format a file after Claude edits it, block changes to protected files, run checks before certain commands, or even get a notification when Claude is waiting for you.The useful distinction for me is this:CLAUDE.md is good for things Claude needs to understand.Hooks are better for things that simply need to happen every time.I've started looking at a few of my project rules differently because of that. If something is deterministic, relying on Claude to remember it feels unnecessary when the tooling can enforce it instead.