Claude-code-hooks diagnose
Diagnose your Claude Code hooks setup. Checks which hooks are active, verifies permissions, and identifies common configuration issues.
install
source · Clone the upstream repo
git clone https://github.com/yurukusa/claude-code-hooks
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/yurukusa/claude-code-hooks "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/diagnose" ~/.claude/skills/yurukusa-claude-code-hooks-diagnose && rm -rf "$T"
manifest:
skills/diagnose/SKILL.mdsource content
Diagnose Claude Code Hooks
Run a diagnostic check on the user's Claude Code hooks setup.
Checks to perform
-
Hook files exist and are executable
for hook in context-monitor.sh syntax-check.sh activity-logger.sh branch-guard.sh decision-warn.sh cdp-safety-check.sh error-gate.sh no-ask-human.sh proof-log-session.sh session-start-marker.sh; do if [ -f "${CLAUDE_PLUGIN_ROOT}/hooks/$hook" ]; then if [ -x "${CLAUDE_PLUGIN_ROOT}/hooks/$hook" ]; then echo "OK: $hook (executable)" else echo "WARN: $hook exists but not executable" fi else echo "MISSING: $hook" fi done -
Dependencies available
— required by most hooksjq
— required by activity-logger, proof-log, context-monitorpython3
— optional, for JS syntax checkingnode
-
Environment variables
- Check if CC_ACTIVITY_LOG, CC_PROOF_LOG_DIR, CC_CONTEXT_MISSION_FILE are set
- Report defaults if not set
-
Settings.json integration
- Check
for hook entries~/.claude/settings.json - Report which hooks are wired and which are missing
- Check
-
Recent activity
- Check if activity log exists and has recent entries
- Check if proof-log directory has recent session logs
Output format
Present results as a health report:
=== Claude Code Hooks Health Check === Hooks: 8/10 active Deps: jq ✓ python3 ✓ node ✓ Env: 3/5 configured Activity: Last entry 2h ago Overall: HEALTHY (2 warnings)
List any warnings or errors with actionable fix instructions.