SkillsLib.ai

Debug Hooks

Debug hook failures in Claude Code with systematic diagnostics

4.4(42 reviews)
500+ downloads
Updated Oct 2026
Verified SafeSecurity VerifiedThis skill was analyzed by our AI security scanner for harmful content including data exfiltration, system manipulation, credential theft, and prompt injection. No threats were detected.

What You Can Do

You can systematically diagnose why hooks aren't firing, producing incorrect output, or behaving unexpectedly. This skill guides you through verification steps—checking hook registration, confirming file existence, testing hooks manually, and identifying silent failures—to pinpoint the exact cause of hook breakdowns and implement targeted fixes.

Features

Cache inspection

verify hook outputs and debug logs are being written to correct project and global directories

Hook registration verification

check .claude/settings.json at both project and global scope to confirm hooks are registered

File existence checks

confirm hook shell wrappers and compiled TypeScript bundles exist and are in expected locations

Manual hook testing

run hooks directly with sample JSON payloads to isolate failures outside the Claude Code runtime

Silent failure detection

identify detached spawns with stdio: 'ignore' that hide hook errors from standard output

Multi-hook diagnostics

systematically debug SessionEnd, PostToolUse, and UserPromptSubmit hooks with hook-specific test patterns

Path debugging

catch common mistakes like incorrect CLAUDE_PROJECT_DIR references or wrong cache paths

Example Output

Hook Registration Check:

code
Project settings found:
  SessionEnd: /project/.claude/hooks/session-end-cleanup.sh ✓
  PostToolUse: /project/.claude/hooks/handoff-index.sh ✓
  Global settings: ~/.claude/settings.json also checked

Manual Hook Test:

code
Test input: {"tool_name": "Write", "tool_input": {"file_path": "test.md"}}
Hook execution: SUCCESS
Output written to: .claude/cache/index.json
Timestamp: 2024-01-15T14:32:11Z

Silent Failure Diagnosis:

code
Found detached spawn with stdio: 'ignore' in hooks/handoff-index.ts
Recommendation: Add file logging to capture errors
Debug log enabled at: .claude/cache/debug.log

What's Included

  • debug-hooks.md: complete diagnostic workflow with all check commands and testing procedures
  • Bash command templates: ready-to-run commands for cache inspection, hook verification, and manual testing
  • JSON test payloads: example inputs for SessionEnd, PostToolUse, and UserPromptSubmit hooks
  • Silent failure checklist: patterns to identify hidden errors in detached spawns and stdio configuration
  • Path reference guide: clarification of $CLAUDE_PROJECT_DIR and global ~/.claude/ directory structure

Who It's For

  • Claude Code developers — debugging hook integrations in AI-powered development workflows
  • DevOps engineers — troubleshooting hook failures in automated code generation pipelines
  • Full-stack developers — resolving hook issues in TypeScript/JavaScript Claude Code projects
  • Software architects — validating hook configurations across project and global settings
  • Engineering leads — systematically diagnosing hook problems before escalating to vendor support

Best For

  • Debugging hooks that fail silently without errors in output
  • Verifying hook registration across project and global configuration files
  • Testing hook behavior in isolation before integration testing
  • Identifying common path errors and stdio configuration issues
  • Systematically ruling out environment and configuration problems in hook chains

You might also like

Quantum-Entangled Claim Analysis for Construction Disputes
$25
Quantum3.3(28)
Quantum-Entangled Claim Analysis for Construction Disputes

This skill maps construction claims as interdependent probability states rather than isolated analyses, allowing you to evaluate how changes in one contractual interpretation cascade through damages calculations, delay causation, and liability allocation. You can simultaneously model competing scenarios—concurrent causation, ambiguous change order triggers, insurance coverage dependencies—and identify which settlement positions minimize exposure across all correlated outcomes, not just single interpretations.

Full-Stack Feature Development Workflow
$30
Full-Stack Feature Development Workflow

You'll transform high-level feature requirements into a complete development plan covering API design, frontend implementation, testing strategy, and documentation. The skill helps you identify dependencies, parallelize work across frontend and backend teams, and establish quality gates that ensure features ship bug-free with proper error handling and logging.

Tdd
$35
Tdd

You'll follow the strict TDD workflow: write a failing test that defines expected behavior, verify it fails, write minimal production code to pass the test, then refactor for quality. This approach ensures complete test coverage, catches bugs early, and produces well-designed code backed by comprehensive test suites. Claude guides you through each phase with examples and enforces TDD principles to prevent shortcuts.

Bid Assembly & Analysis for Preconstruction Estimates
$40
Bid Assembly & Analysis for Preconstruction Estimates

You can rapidly process multiple subcontractor bid responses—from trade contractors, material suppliers, and specialty vendors—into a cohesive, auditable estimate structure. Claude extracts key bid components, identifies pricing inconsistencies against benchmarks or prior projects, flags scope gaps and exclusions, and organizes everything by CSI division for seamless estimate assembly. This eliminates manual spreadsheet comparison and reduces the risk of overlooked scope omissions or pricing anomalies when managing 15+ concurrent bids.

Implement Task
$35
Full-Stack4.6(48)
Implement Task

You can deploy this agent to execute specific implementation tasks within a larger development plan. It operates independently with fresh context, follows test-driven development principles for every code change, and creates comprehensive handoff documentation that captures progress, decisions, and learnings for the next task executor. This ensures consistent code quality, prevents rework, and maintains continuity across distributed implementation efforts.

Slash Commands
$35
Tooling4.5(50)
Slash Commands

You can create reusable slash commands that execute instantly in Claude Code conversations. Commands support bash execution, file references, arguments, and tool permissions. Use built-in commands like /cost, /review, /memory, and /clear, or define custom project and personal commands stored in .claude/commands/ or ~/.claude/commands/.

Math
$35
Math

Solve algebraic and transcendental equations, compute derivatives and integrals, perform matrix operations, simplify expressions, compute limits and series expansions, solve differential equations, and convert units. Claude automatically selects the best computational engine for your problem—SymPy for symbolic math, Z3 for logical proofs, Pint for unit conversion—so you get fast, verified answers without manual tool selection.

Construction Estimate Analysis & Refinement
$35
Estimating4.0(34)
Construction Estimate Analysis & Refinement

You can systematically analyze construction estimates by breaking down components, validating labor and material pricing against market data, identifying embedded errors or outdated assumptions, and applying data-driven contingency allocation. Claude helps you produce risk-adjusted cost projections that are defensible to stakeholders and competitive in bid scenarios, reducing estimate variance and catching pricing gaps before client submission.

$25.00