debug-hooks

Diagnose Claude Code hooks that fail to fire or produce incorrect output.

3.9k|296|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/parcadei/Continuous-Claude --skill debug-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-hooks
Source: https://github.com/parcadei/Continuous-Claude/tree/main/.claude/skills/debug-hooks
Command: npx skills add https://github.com/parcadei/Continuous-Claude --skill debug-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured workflow to diagnose and fix issues where Claude Code hooks fail to fire, produce incorrect outputs, or misbehave.

Core Features & Use Cases

  • Outputs inspection: Check project cache, outputs, and debug logs before editing.
  • Hook registration verification: Confirm registration in settings.json (project/global).
  • Hook file presence: Ensure wrappers and bundles exist.
  • Manual test steps: Provide commands to reproduce issues and verify fixes.

Quick Start

Follow the workflow to diagnose a misfiring PreToolUse hook by inspecting outputs, registrations, and hook files.

Frequently Asked Questions about debug-hooks

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

FAQPage Schema
Why isn't my Claude Code hook firing when I expect it to?

Claude Code hooks fail to fire when they're not registered in settings.json, the hook files don't exist, or the session environment isn't loading them. Debug hooks by checking project and global settings.json for registration, verifying hook wrapper and bundle files are present, and inspecting project cache outputs for silent failures.

How do I diagnose a PostToolUse hook that's not triggering?

Verify PostToolUse hook registration in settings.json, confirm the hook file exists in your project, manually test the hook using provided Bash commands, and check debug logs for errors. Rebuild your TypeScript after edits and restart your session to apply changes.

What should I check first when a PreToolUse hook produces wrong output?

Inspect project cache and outputs before editing. Verify hook registration in settings.json, ensure hook files exist, then manually test the hook with reproduction commands. Check for silent failures and rebuild TypeScript after making fixes.

Can I debug Claude Code hooks in CI environments the same way as locally?

Yes. The debugging workflow applies to both local projects and CI environments. Follow the same steps: verify hook registration in settings.json, check hook file presence, inspect outputs and debug logs, manually test with provided commands, and rebuild after edits.

How do I fix a hook that's not working after editing?

After editing hook files, rebuild using the TypeScript build process in your environment, then restart your Claude Code session. Verify the changes by manually testing the hook with provided commands and inspecting outputs for errors.

What does hook registration in settings.json actually control?

Hook registration in settings.json tells Claude Code which hooks to load and when to trigger them. Check both project-level and global settings.json to ensure your hook is registered; missing registration is a common cause of hooks not firing at SessionStart, PreToolUse, or PostToolUse events.