Production-tested · 2,500+ npm downloads/day · 700+ hours
Claude Code Production Hooks
6 hooks + 5 templates + 9 scripts that keep autonomous Claude Code from breaking things silently. Production-ready in 15 minutes. Every item exists because something went wrong without it.
¥800 (Chapter 3 free)
14 chapters · 59,000+ words
From 700+ hours of autonomous operation
Read the Hook Design Guide →
On Zenn · Read Chapter 3 free before you buy
Not sure yet? Check your setup score first (free) →
2,500+
npm downloads / day
700+
hours of autonomous testing
18/20
cc-health-check items covered
14
hooks + templates + tools
Without production hooks, autonomous Claude Code:
- Runs out of context at tool call 150+ and loses all session state — no checkpoint, no handoff
- Introduces a syntax error in one file, then edits 30 more files on top of it
- Pushes directly to main while you're away — no branch guard, no review
- Keeps asking "should I continue?" every 5 minutes instead of deciding autonomously
- Hits 3 consecutive errors, ignores them all, and posts broken output to an external service
- Runs for 6 hours overnight with zero record of what it changed or why
Before: Fresh install
16/19
CRITICAL — no hooks, no guardrails, no recovery
After: Ops Kit installed
2/19
LOW — 14-point improvement in 15 minutes
Why pay when claude-code-hooks is free on GitHub?
The free repo gives you 6 hooks and 5 templates. You configure them yourself. The Ops Kit gives you the same hooks plus 9 automation scripts (watchdog, CLAUDE.md generator, risk-score), a one-command installer, 3 pre-tested settings.json configs, and a step-by-step deployment guide. Free = parts. Ops Kit = tested, configured, running in 15 minutes.
Step 1: Check your current score (free)
Run npx cc-health-check or use the browser version — 20 checks, zero install. See exactly what's missing before you decide.
Run cc-health-check (free) →
What's included
10 Production Hooks
- Context window monitor (graduated warnings)
- Activity logger (JSONL audit trail)
- Syntax checker (Python, Shell, JS, JSON, YAML)
- Decision warning (sensitive path alerts)
- CDP safety (blocks raw WebSocket construction)
- Session proof logger (5W1H daily summaries)
- Session start marker
- No-ask-human (autonomous mode enforcer)
- Branch guard (blocks direct push to main)
- Error gate (blocks external actions on errors)
3 Exclusive Tools (not in the free version)
- Watchdog — detects hung/idle sessions and auto-recovers
- CLAUDE.md Generator — builds project-specific rules from your codebase
- Risk Score — pre-flight safety check before autonomous runs
6 Operational Templates
- CLAUDE-autonomous.md — rules for unsupervised execution
- CLAUDE-baseline.md — rules for supervised sessions
- dod-checklists.md — 4-type Definition of Done
- task-queue.yaml — structured task queue
- mission.md — persistent state across restarts
- LESSONS.md — structured incident log
3 Settings Presets
- settings.json — minimal / standard / autonomous configs
How to install
1
Download and unzip. All files are plain shell scripts and Markdown templates.
2
Run bash install.sh — copies hooks, sets permissions, installs templates.
3
Pick a settings preset (minimal, recommended, or autonomous) and paste into your settings.json.
4
Run cc-health-check to confirm your score improved.
# One command — done in 15 minutes
bash install.sh
# Or manually:
# cp hooks/* ~/.claude/hooks/ && chmod +x ~/.claude/hooks/*.sh
# cp templates/* ~/ops/
Built from real autonomous sessions, not theory
Every hook exists because something actually broke during 700+ hours of unattended Claude Code operation. The context monitor was added after a session silently lost all state at tool call 160. The syntax checker was added after a Python error cascaded through 30+ files. The error gate was added after Claude posted broken output to an external API.
The same hooks and templates are running right now in production — powering the autonomous development of cc-safe-setup (2,500+ npm downloads/day, 4,572 tests) and the entire cc-toolkit ecosystem.