Claude Code hooks examples
Ordered by install count from the source, then by repository stars on GitHub. A language model writes each description from the source file; only descriptions that passed the automatic check are listed.
-
1
3,745installs
smart-commit
A Claude hook that commits the changed file right after Edit or Write. Useful when you would rather not build git history by hand.
hook · davila7 · MIT
-
2
3,412installs
update-search-year
This hook appends the current year to WebSearch queries that lack one. Useful when you want fresh results instead of last year's pages.
hook · davila7 · MIT
-
3
3,235installs
lint-on-save
The hook fires a linter right after the agent changes a file. ESLint, Pylint or RuboCop runs on its own, no manual call needed.
hook · davila7 · MIT
-
4
2,314installs
dependency-checker
A PostToolUse hook that runs a package audit after you touch a dependency file, so outdated or vulnerable packages surface right away.
hook · davila7 · MIT
-
5
2,256installs
security-scanner
This hook runs a security pass whenever Claude edits or writes a file. It looks for vulnerabilities and hardcoded secrets.
hook · davila7 · MIT
-
6
2,249installs
nextjs-code-quality-enforcer
A PostToolUse hook that checks every Next.js file you write: App Router structure, Server and Client Component directives, imports, types. It runs right after an edit.
hook · davila7 · MIT
-
7
1,405installs
format-python-files
This hook runs black on every .py file Claude edits. Formatting stops being a separate step you remember to do.
hook · davila7 · MIT
-
8
1,328installs
backup-before-edit
A Claude hook that copies a file with a timestamp before every edit. Useful when the agent rewrites code and you want a way back.
hook · davila7 · MIT
-
9
1,027installs
test-runner
This hook fires a test command right after Claude edits a file. Handy when you keep forgetting to re-run checks by hand.
hook · davila7 · MIT
-
10
393installs
performance-budget-guard
A Claude hook that measures your Next.js JS bundle after a build and blocks the deploy when it goes over the performance budget.
hook · davila7 · MIT
-
11
363installs
vercel-environment-sync
A hook that inspects environment variables after an .env edit and points you to the right Vercel sync commands. Useful when local and deployed values drift apart.
hook · davila7 · MIT
-
12
279installs
env-file-protection
This hook stops Write calls aimed at .env* files, so an agent cannot overwrite your secrets by accident. One command adds it to Claude settings.
hook · davila7 · MIT
-
13
279installs
slack-notifications
Posts a Slack message when Claude finishes working or a subagent completes its task. Useful when you step away from the terminal and want to know the run is done.
hook · davila7 · MIT
-
14
217installs
discord-notifications
Posts a Discord message when Claude stops working or a subagent finishes. Useful when you step away from the terminal and want a ping on completion.
hook · davila7 · MIT
-
15
192installs
tdd-gate
The hook blocks edits to production files until a matching test exists. Useful if you want the agent to keep the TDD order.
hook · davila7 · MIT
-
16
189installs
debug-window
Opens a live-tailing debug log window when Claude starts with --debug or -d, then closes it when the session ends.
hook · davila7 · MIT
-
17
163installs
change-logger
This hook writes each file mutation to a CSV: timestamp, tool, path, action and details. Handy when you are prepping a demo and need to show what the agent touched.
hook · davila7 · MIT
-
18
★ 40,418repo stars
secrets-scanner official
Scans the files a Copilot coding agent touched during a session for leaked keys and credentials before they get committed. Useful when the agent edits code fast.
hook · github · MIT
-
19
★ 40,418repo stars
dependency-license-checker official
A GitHub Copilot hook that scans newly added dependencies at session end and flags copyleft licenses before they get committed.
hook · github · MIT
Other collections
- Best Claude Code skills 14,247
- Best Claude Code plugins 264
- Best Claude Code subagents 268
- Best Codex skills 13,953
- Best MCP servers 925
- MCP servers for Cursor 925
- Frontend skills 2,334
- Testing skills 1,492
- Security skills and rules 1,500
- SEO and marketing skills 448
- Design skills 1,744
- DevOps skills 2,410
- MCP servers for databases 162
- Browser and scraping MCP servers 87
- Claude Code design skills 1,588
- Code review skills 1,412
- AI agent tools for game development 746
- Marketing skills and agents 1,566
- Scientific skills for AI agents 688
- UI/UX skills 16
- Writing skills 131
- Claude Code slash commands 142
- GitHub Copilot agent skills 13,784
- Gemini CLI extensions and skills 13,473
- GitHub Copilot instructions 85
- MCP servers for Claude Code 925
- MCP servers for Codex 925
- MCP servers for VS Code 925
- Remote MCP servers 244
- Office skills: PDF, Excel, PowerPoint 402
- Data analysis skills 1,377
- Research skills 334