debug-hooks

Systematic hook debugging workflow. Use when hooks aren't firing, producing wrong output, or behaving unexpectedly.

By parcadei · 495 installs

npx skills add parcadei/continuous-claude-v3 --skill debug-hooks

Source repository · Upstream listing

Debug Hooks Systematic workflow for debugging Claude Code hooks. When to Use "Hook isn't firing" "Hook produces wrong output" "SessionEnd not working" "PostToolUse hook not triggering" "Why didn't my hook run?" Workflow 1. Check Outputs First (Observe Before Editing) 2. Verify Hook Registration 3. Check Hook Files Exist 4. Test Hook Manually 5. Check for Silent Failures If using detached spawn with stdio: 'ignore' : Fix: Add temporary logging: 6. Rebuild After Edits If you edited TypeScript source, you MUST rebuild: Source edits alone don't take effect the shell wrapper runs the bundled .mjs . Common Issues Symptom Likely Cause Fix Hook never runs Not registered in settings.json Add to correct event in settings Hook runs but no output Detached spawn hiding errors Add logging, check manually Wrong session ID Using "most recent" query Pass ID explicitly Works locally, not in CI Missing dependencies Check npx/node availability Runs twice Registered in both global + project Remove duplicate Debug Checklist [ ] Outputs exist? ( ls la .claude/cache/ ) [ ] Registered? ( grep A10 '"hooks"' .claude/settings.json ) [ ] Files exist? ( ls .claude/hooks/ .sh ) [ ] Bundle current? ( ls la .claude/hooks/dist/ ) [ ] Manual test works? ( echo '{}' ./hook.sh ) [ ] No silent failures? (check for stdio: 'ignore' ) Source Sessions Derived from 10 sessions (83% of all learnings): a541f08a, 1c21e6c8, 6a9f2d7a, a8bd5cea, 2ca1a178, 657ce0b2, 3998f3a2, 2a829f12, 0b46cfd7, 862f6e2c