📚AllForClaude
SkillsMCPPluginsCategoriesHow to install
📚 AllForClaude

Skills, MCP Servers & Plugins for Claude, All in One Place.

By type

  • Skills
  • MCP Servers
  • Plugins
  • Subagents
  • Slash Commands

Categories

  • 💻 Development & Coding
  • ⚡ Productivity & Automation
  • 🎨 Creative, Design & Art
  • 📄 Documents & Office
  • 💬 Communication & Messaging
  • 🤖 AI & Machine Learning

Learn

  • How to install
  • All categories
  • Search

© 2026 AllForClaude. An independent, community directory — not affiliated with Anthropic.

Aggregated from claudeskills.info, skillshubmcp.com, claudedirectory.org & the official MCP registry.

  1. Home
  2. /Hooks

Claude Hooks

Hooks run automatically at specific points in Claude Code's lifecycle to enforce rules, format code or trigger side-effects.

25 hooks in the library. How to install hooks →

25 items

🔄
🪝Hook

Build Verify Notice

The agent kicks off a build inside a Bash command and moves on, missing whether it actually succeeded. A post-command check pins the result to the transcript.

🔄Agents & Workflow
💬
🪝Hook

Commit Message Check

The agent writes commit messages that don't follow Conventional Commits, breaking changelog generation and semantic-release. Catch the bad message before the commit runs.

💬Communication & Messaging
💻
🪝Hook

console.log Guard

Debug `console.log` / `print` statements slip into committed code because nothing flags them at edit time. A quick scan on each edit keeps stray debug output out of the tree.

💻Development & Coding
🔄
🪝Hook

Context Usage Warning

Long sessions silently approach the context limit and then compact at the worst moment, dropping state mid-task. A running warning lets the agent checkpoint and compact deliberately.

🔄Agents & Workflow
⚡
🪝Hook

Per-Session Cost Tracker

You have no idea how many tool calls a long session made until it is over. A lightweight counter appended on every tool call gives you a live activity ledger to review.

⚡Productivity & Automation
🤖
🪝Hook

Dangerous Command Block

One `rm -rf`, force-push, or `DROP TABLE` from an over-eager agent is unrecoverable. The harness should refuse destructive commands rather than trust the model to be careful.

🤖AI & Machine Learning
🔄
🪝Hook

Denied-Command Audit Log

When safety hooks deny commands, you lose the signal — there's no record of what the agent tried and got blocked on. An append-only audit log turns denials into a reviewable trail.

🔄Agents & Workflow
✍️
🪝Hook

Doc-File Sprawl Guard

Agents love to create README.md, SUMMARY.md, and NOTES.md files nobody asked for, cluttering the repo. Warn (or block) on unsolicited documentation-file creation.

✍️Writing & Content
🔄
🪝Hook

File Backup on Edit

An agent edit can clobber a file in a way that's awkward to recover from mid-session. A cheap pre-edit snapshot gives you an instant local rollback point.

🔄Agents & Workflow
🔄
🪝Hook

Format on Edit

Agent-written files drift from house formatting, producing noisy diffs and pre-commit churn. Formatting should be automatic, not a review comment.

🔄Agents & Workflow
🔄
🪝Hook

Pre-Push Review Reminder

The agent pushes before anyone has looked at the diff. A pre-push reminder forces a beat to confirm the change set is intended and the branch is right.

🔄Agents & Workflow
🔄
🪝Hook

Lint (auto-fix) on Edit

Lint violations accumulate silently between edits and only surface in CI. Running the linter on each edited file keeps the tree green as the agent works.

🔄Agents & Workflow
⚡
🪝Hook

Mode Activation on Start

You want a session to begin in a specific posture (strict review, intensity level, house ruleset) without pasting instructions every time. A SessionStart hook activates the mode and injects its rules.

⚡Productivity & Automation
💬
🪝Hook

Notification Forward (Slack / Webhook)

When a long-running agent needs attention or finishes, nobody is watching the terminal. Forward its notifications to Slack (or any webhook) so the human gets pinged.

💬Communication & Messaging
🔬
🪝Hook

PR-Created Follow-up

The agent opens a PR via `gh pr create` and stops, leaving reviewers unpinged and the checklist unmentioned. A follow-up hook posts a next-steps note the moment the PR lands.

🔬Research & Knowledge
🔒
🪝Hook

Protected-Path Freeze

During a scoped task the agent wanders and edits files far outside the intended directory. A freeze boundary keeps writes inside the area you actually authorized.

🔒Security
⚡
🪝Hook

Language-Aware Quality Gate

Different files need different checks — JSON needs schema/format, Go needs vet, Python needs a linter. One gate that dispatches by file type keeps every edit clean without per-language wiring.

⚡Productivity & Automation
🔄
🪝Hook

Review-Finding Quality Gate

A review sub-agent "finishes" with a vague thumbs-up and no actionable findings. Gate the stop on structured output — require concrete findings with severities before the review counts as done.

🔄Agents & Workflow
⚡
🪝Hook

Delegate to a Safety-Net Binary

Reimplementing command-safety heuristics in shell is error-prone and hard to keep current. Delegate the whole PreToolUse decision to a maintained safety-net tool instead of hand-rolling patterns.

⚡Productivity & Automation
✍️
🪝Hook

Secret Scan Before Commit

The agent stages a file that contains an API key, an AWS secret, or a private key and commits it. Once pushed, the secret is compromised forever. Scan staged content before the commit runs.

✍️Writing & Content
🔬
🪝Hook

Workspace Orientation on Start

In a knowledge-base or notes repo, the agent needs the shape of the workspace — which files exist, what the methodology is — before it can act usefully. Inject a structure map at session start.

🔬Research & Knowledge
🔄
🪝Hook

Session-Start Context Load

Every new session starts cold — the agent re-derives project context it learned last time. A SessionStart hook injects the essentials (recent branch, open tasks, house rules) up front.

🔄Agents & Workflow
🔄
🪝Hook

System Path Guard

When an agent has shell access on a real machine, a stray write to /etc, a firewall flush, or a `curl | sudo sh` can take the host down. System-level operations need a harder fence than project files.

🔄Agents & Workflow
🧪
🪝Hook

Test Gate on Stop

The agent announces it is done while the test suite is red. Without a gate, "finished" is self-graded and the regression ships.

🧪Testing & QA