# Claude Code hooks examples

Top 19 of 19 by installs (by repository stars when installs are unknown).

- HTML: https://affpapa.org/en/nevibecode/best/claude-code-hooks
- Instructions for agents: https://affpapa.org/en/nevibecode/agents.md

- [smart-commit](https://affpapa.org/en/nevibecode/hooks/smart-commit.md) — hook · davila7 · Claude Code · 3745 installs — A Claude hook that commits the changed file right after Edit or Write.
- [update-search-year](https://affpapa.org/en/nevibecode/hooks/update-search-year.md) — hook · davila7 · Claude Code · 3412 installs — This hook appends the current year to WebSearch queries that lack one.
- [lint-on-save](https://affpapa.org/en/nevibecode/hooks/lint-on-save.md) — hook · davila7 · Claude Code · 3235 installs — The hook fires a linter right after the agent changes a file.
- [dependency-checker](https://affpapa.org/en/nevibecode/hooks/dependency-checker.md) — hook · davila7 · Claude Code · 2314 installs — A PostToolUse hook that runs a package audit after you touch a dependency file, so outdated or vulnerable packages surface right away.
- [security-scanner](https://affpapa.org/en/nevibecode/hooks/security-scanner.md) — hook · davila7 · Claude Code · 2256 installs — This hook runs a security pass whenever Claude edits or writes a file.
- [nextjs-code-quality-enforcer](https://affpapa.org/en/nevibecode/hooks/nextjs-code-quality-enforcer.md) — hook · davila7 · Claude Code · 2249 installs — A PostToolUse hook that checks every Next.js file you write: App Router structure, Server and Client Component directives, imports, types.
- [format-python-files](https://affpapa.org/en/nevibecode/hooks/format-python-files.md) — hook · davila7 · Claude Code · 1405 installs — This hook runs black on every .py file Claude edits.
- [backup-before-edit](https://affpapa.org/en/nevibecode/hooks/backup-before-edit.md) — hook · davila7 · Claude Code · 1328 installs — A Claude hook that copies a file with a timestamp before every edit.
- [test-runner](https://affpapa.org/en/nevibecode/hooks/test-runner.md) — hook · davila7 · Claude Code · 1027 installs — This hook fires a test command right after Claude edits a file.
- [performance-budget-guard](https://affpapa.org/en/nevibecode/hooks/performance-budget-guard.md) — hook · davila7 · Claude Code · 393 installs — A Claude hook that measures your Next.js JS bundle after a build and blocks the deploy when it goes over the performance budget.
- [vercel-environment-sync](https://affpapa.org/en/nevibecode/hooks/vercel-environment-sync.md) — hook · davila7 · Claude Code · 363 installs — A hook that inspects environment variables after an .env edit and points you to the right Vercel sync commands.
- [env-file-protection](https://affpapa.org/en/nevibecode/hooks/env-file-protection.md) — hook · davila7 · Claude Code · 279 installs — This hook stops Write calls aimed at .env* files, so an agent cannot overwrite your secrets by accident.
- [slack-notifications](https://affpapa.org/en/nevibecode/hooks/slack-notifications.md) — hook · davila7 · Claude Code · 279 installs — Posts a Slack message when Claude finishes working or a subagent completes its task.
- [discord-notifications](https://affpapa.org/en/nevibecode/hooks/discord-notifications.md) — hook · davila7 · Claude Code · 217 installs — Posts a Discord message when Claude stops working or a subagent finishes.
- [tdd-gate](https://affpapa.org/en/nevibecode/hooks/tdd-gate.md) — hook · davila7 · Claude Code · 192 installs — The hook blocks edits to production files until a matching test exists.
- [debug-window](https://affpapa.org/en/nevibecode/hooks/debug-window.md) — hook · davila7 · Claude Code · 189 installs — Opens a live-tailing debug log window when Claude starts with --debug or -d, then closes it when the session ends.
- [change-logger](https://affpapa.org/en/nevibecode/hooks/change-logger.md) — hook · davila7 · Claude Code · 163 installs — This hook writes each file mutation to a CSV: timestamp, tool, path, action and details.
- [secrets-scanner](https://affpapa.org/en/nevibecode/hooks/secrets-scanner.md) — hook (official GitHub) · github · GitHub Copilot · ★ 40418 — Scans the files a Copilot coding agent touched during a session for leaked keys and credentials before they get committed.
- [dependency-license-checker](https://affpapa.org/en/nevibecode/hooks/dependency-license-checker.md) — hook (official GitHub) · github · GitHub Copilot · ★ 40418 — A GitHub Copilot hook that scans newly added dependencies at session end and flags copyleft licenses before they get committed.

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
