debug-hooks

Diagnose and fix Claude Code hooks that fail to fire or produce incorrect outputs.

1|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/tfunk1030/vibe --skill debug-hooks-tfunk1030
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-hooks
Source: https://github.com/tfunk1030/vibe/tree/main/.claude/skills/debug-hooks
Command: npx skills add https://github.com/tfunk1030/vibe --skill debug-hooks-tfunk1030

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Systematic workflow for debugging Claude Code hooks to diagnose and fix issues where hooks aren’t firing, producing wrong output, or behaving unexpectedly.

Core Features & Use Cases

  • Check Outputs First (Observe Before Editing): verify logs and outputs across CLAUDE caches to identify discrepancies.
  • Verify Hook Registration: ensure hook events are registered in settings (SessionEnd, PostToolUse, UserPromptSubmit) and global scopes.
  • Check Hook Files Exist: verify shell wrappers and compiled bundles exist for hook execution.
  • Test Hook Manually: simulate hook invocations with example payloads to validate behavior.
  • Check for Silent Failures: diagnose detached spawn patterns and add temporary logging to surface errors.
  • Rebuild After Edits: rebuild hook bundles after changes to apply updates.

Quick Start

Follow the hook debugging workflow to identify failing hooks, verify registration, test manually, and rebuild to restore correct execution.

Frequently Asked Questions about debug-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why are my Claude Code hooks not firing or producing incorrect outputs?

When Claude Code hooks misbehave, verify hook registration in settings for SessionEnd, PostToolUse, or UserPromptSubmit events, check that shell wrappers and compiled bundles exist, and test hook invocations manually with example payloads to surface silent failures.

How do I debug Claude Code hooks that fail during session cleanup or tool handoff?

Debug session cleanup and tool handoff hooks by inspecting CLAUDE cache logs first to identify discrepancies, verifying hook registration across global scopes, and testing hook invocations manually with example payloads to validate behavior before rebuilding.

What is the best way to test Claude Code hooks manually before deploying changes?

Test Claude Code hooks manually by simulating invocations with example payloads to validate behavior. This surfaces silent failures from detached spawn patterns, ensuring SessionEnd, PostToolUse, and UserPromptSubmit hooks trigger predictably before rebuilding bundles.

Do I need to rebuild hook bundles after editing Claude Code hook files?

Yes, you must rebuild hook bundles after editing Claude Code hook files to apply updates. Rebuilding compiled bundles ensures changes take effect, allowing SessionEnd, PostToolUse, and UserPromptSubmit hooks to trigger predictably across local Claude project sessions.

How do I check for silent failures in detached spawn patterns within Claude Code hooks?

Check for silent failures in detached spawn patterns by adding temporary logging to surface errors. Verify CLAUDE cache logs to identify discrepancies, then simulate hook invocations with example payloads to validate behavior and ensure hooks trigger predictably.