Posted by decide 14 hours ago
Claude Code released hooks a few days ago, and I set up a few hooks to improve my experience (and velocity) using Claude Code:
• check-package-age.sh: prevents CC from installing outdated packages • code-quality-primer.sh / code-quality-validator.sh: Validates code quality • code-similarity-check.sh: Helps prevent duplicate code (and uses an indexer to support faster method lookup) • pre-commit-check.sh: Blocks bad commits with lint/test checks • claude-context-updater.sh: Auto-updates CLAUDE.md to keep context fresh (and helps CC navigate the codebase faster)
To help me debug that the hooks were running, I added (local) logging, and I can see stats on the hooks that have run.
I tend to add a new hook when I notice CC not behaving as I want. I've got a backlog of hooks to add.
This is mostly functional, though before it being 'perfect' I figured I'd put it out here to get input and maybe some other contributors.