Comment by paperpunk

4 hours ago

I have a harness for Claude Code "hooks" (https://code.claude.com/docs/en/hooks) which in my case execute a Go tool in a separate project which runs changes made by claude through a validator with various rules that can be defined (regex, semgrep, etc.). They can warn claude or they can block changes outright.

When I find claude is using tools or approaches that I have replaced with more specific ones, I ask claude to add a hook to prevent doing this in the future and point it to the instructions of what to do instead.

And of course I wrapped all that up in a Skill so it knows what approaches to take to add things to hooks.

It becomes fairly trivial to incrementally stop it making repeated mistakes like this.