Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By yurukusav1.0.0MITIn 1 marketplace
Deprecated: moved to cc-safe-setup; this 16-hook original is kept for compatibility. Hooks run on their own to guard against destructive Bash commands and branch changes, and log activity.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
⚠️ This repository has moved to cc-safe-setup — 914 hooks, one-command install. This repo (16 hooks) is the original version kept for backward compatibility.
The published package on npm is still the 2026-04-20 build. The commands below point at GitHub directly so you get the current version.
npx github:yurukusa/cc-safe-setup # Install 8 essential hooks in 10 seconds
npx github:yurukusa/cc-safe-setup --verify # Test each hook works
914 Example Hooks | Interactive Hook Selector | Token Checkup (diagnose token waste)
New here? The Claude Code Safety Field Manual is free (minimum price zero): the pre-flight checklist, what each guard actually refuses, and how to make one fire on purpose so you can watch it work.
Spending too much on Claude Code? The average developer spends $13/day on tokens. Cut Your Claude Code Token Usage in Half is 48 diagnostic symptoms for cost — subagents, MCP server overhead, context bloat, cache misses — measured on one operation rather than reasoned about (English, from $9.99).
Interactive Cookbook — search, filter, and copy 26 hook recipes in your browser.
16 hooks + 6 templates from 700+ hours of autonomous Claude Code operation.
┌─────────────────────────────────────────────────────────┐
│ Claude Code Session │
│ │
│ User Prompt ──→ PermissionRequest ──→ PreToolUse │
│ (auto-approve- (destructive-guard │
│ readonly) branch-guard │
│ comment-strip │
│ cd-git-allow │
│ secret-guard) │
│ │ │ │
│ ▼ ▼ │
│ Tool Executes ──→ PostToolUse │
│ (syntax-check │
│ context-monitor │
│ activity-logger │
│ tmp-cleanup) │
│ │ │
│ ▼ │
│ Session End ──→ Stop │
│ (proof-log-session) │
│ │
│ Notification ──→ no-ask-human │
│ PreCompact ──→ proof-log-session │
└─────────────────────────────────────────────────────────┘
Production infrastructure for running Claude Code autonomously. Every hook exists because something went wrong without it. Every template encodes a workflow pattern that survived real-world autonomous operation.
Honest disclaimer: This is what works for us. Your workflow may differ. These hooks and templates address the failure modes we actually encountered.
Covers 18 of 20 checks in cc-health-check.
npx github:yurukusa/cc-safe-setup # Install 8 essential hooks
npx github:yurukusa/cc-safe-setup --verify # Test each hook works
npx github:yurukusa/cc-safe-setup --doctor # Diagnose any issues
npx github:yurukusa/cc-safe-setup --create "block npm publish without tests" # Generate custom hooks
Want 914 hooks? Use cc-safe-setup — the successor to this repo with 57x more hooks, a test suite, and one-command install.
New to hooks? Read the Troubleshooting Guide or print the Cheat Sheet.
Losing tokens too fast? Cut Your Claude Code Token Usage in Half — 48 diagnostic symptoms for cost, measured on one operation over 800+ hours (English, from $9.99, free sample). A longer Japanese book on the same subject (37 chapters) is on Zenn — it is a separate book, not a translation.
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub yurukusa/claude-code-hooks --plugin claude-code-hooksPlugins from other owners that cover similar ground