I’ve found hooks to be really useful for correcting or inducing certain behaviors/outcomes that tend to occur during agentic development.
For example, I’m working on a project to remake the Final Fantasy XI client. My repository has a bunch of git submodules that reference other peoples’ related efforts, and an open source server. For example, despite including CLAUDE.md to suggest otherwise, Claude Code always ends up writing these insanely dense comments referring to specific files and lines of code in submodules. When those submodules update, now the comments are no longer correct.
So I added a hook to detect when comments are included. Then, for example, I have a deterministic heuristic and script involved to remove some kinds of comments, and another that asks Haiku to quickly LLM-as-a-judge whether or not to edit/remove the comment.
Similarly, I have a stop hook that reminds Claude to commit its code logically on main, noting that other changes may have been added by other concurrent sessions (I avoid worktrees and even branching for this particular project and stage of development.) It works well.