From claude-code-hooks
Guides setup of Claude Code Hooks for production safety, selecting profiles (Minimal, Standard, Autonomous), configuring env vars like CC_CONTEXT_MISSION_FILE, and running verification tests.
npx claudepluginhub yurukusa/claude-code-hooks --plugin claude-code-hooksThis skill uses the workspace's default tool permissions.
You are helping the user set up production safety hooks for Claude Code.
Develops Claude Code hooks to run shell commands or LLM prompts on events like PreToolUse for automations, guardrails, quality checks, and pre-push tests.
Configures Claude Code hooks for lifecycle events like PreToolUse, SessionStart, and automation use cases such as formatting enforcement and permission control.
Guides creation and configuration of Claude Code plugin hooks for events like PreToolUse, PostToolUse, Stop, and SessionStart using prompt-based and command types.
Share bugs, ideas, or general feedback.
You are helping the user set up production safety hooks for Claude Code.
| Hook | Purpose | Event | Matcher |
|---|---|---|---|
| context-monitor.sh | Context window warnings (40% → 25% → 20% → 15%) | PostToolUse | all |
| activity-logger.sh | JSONL audit trail of file changes | PostToolUse | Edit|Write |
| syntax-check.sh | Auto syntax validation after edits | PostToolUse | Edit|Write |
| decision-warn.sh | Alerts on edits to sensitive paths | PreToolUse | Edit|Write |
| cdp-safety-check.sh | Blocks raw WebSocket CDP construction | PreToolUse | Bash |
| proof-log-session.sh | 5W1H session summaries | Stop, PreCompact | all |
| session-start-marker.sh | Records session start time | PostToolUse | all |
| no-ask-human.sh | Blocks questions during autonomous operation | PostToolUse | all |
| branch-guard.sh | Blocks pushes to main/master | PreToolUse | Bash |
| error-gate.sh | Blocks external actions when errors exist | PreToolUse | Bash |
CC_CONTEXT_MISSION_FILE — path to mission.md (default: $HOME/mission.md)CC_ACTIVITY_LOG — path to activity log (default: $HOME/claude-activity-log.jsonl)CC_MONITORED_DIRS — colon-separated paths for decision-warn (default: $HOME/bin:$HOME/.claude/hooks)CC_PROTECT_BRANCHES — colon-separated branch names (default: main:master)CC_ERROR_LOG — path to error tracker (default: $HOME/.claude/error-tracker.log)CC_PROOF_LOG_DIR — path to proof logs (default: $HOME/proof-log)