karanb192

Claude Code Hooks — Development skill for Claude Code

Development

🪝 A growing collection of useful Claude Code hooks.

How to install Claude Code Hooks

This entry records only its repository, not the path inside it, so there is no exact command to give. Open karanb192/claude-code-hooks and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code Hooks does

🪝 A growing collection of useful Claude Code hooks. Copy, paste, customize.

Alternatives in Development

  • Claude How To — by luongnv89 — Example-driven guide to mastering Claude Code through progressive tutorials with copy-paste tem 8.5k ★
  • Last30days Skill — Claude Code skill that researches any topic across Reddit + X from the last 30 days, then writes copy-paste-re 4.4k ★
  • Claudekit Backend Tools — Backend development tools collection 1.9k ★

README

claude-code-hooks

🪝 Ready-to-use hooks for Claude Code — safety, automation, notifications, and more.

[![GitHub stars](https://img.shields.io/github/stars/karanb192/claude-code-hooks?style=social)](https://github.com/karanb192/claude-code-hooks) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Tests](https://img.shields.io/badge/tests-262%20passing-brightgreen)](hook-scripts/tests)

🎬 Quick Demo

Protecting Secrets Blocking Dangerous Commands
Hook blocking .env read Hook blocking dangerous commands

A growing collection of tested, documented hooks you can copy, paste, and customize.


📑 Table of Contents


🪝 Hooks

Pre-Tool-Use

Runs **before** Claude executes a tool. Can block or modify the operation.

Hook Matcher Description
block-dangerous-commands Bash Blocks dangerous shell commands (rm -rf ~, fork bombs, curl|sh)
protect-secrets Read|Edit|Write|Bash Prevents reading/modifying/exfiltrating sensitive files

Post-Tool-Use

Runs **after** Claude executes a tool. Can react to results.

Hook Matcher Description
auto-stage Edit|Write Automatically git stages files after Claude modifies them

Notification

Fires when Claude needs user attention.

| Hook | Matcher