Отладка хуков в Claude Code

general

debug-hooks is a Claude Code skill that provides a systematic six-step workflow for diagnosing hooks that fail to fire, produce wrong output, or behave unexpectedly. The workflow covers inspecting `.claude/cache/` outputs and logs, verifying hook registration in both project and global `settings.json`, confirming that shell wrappers and compiled `.mjs` bundles exist, running hooks manually via echo-pipe, catching silent failures caused by `stdio: 'ignore'` in detached spawns, and rebuilding TypeScript sources with esbuild when edits don't take effect. Available tools are Bash, Read, and Grep. It targets developers working with `SessionEnd`, `PostToolUse`, or `UserPromptSubmit` hooks who need to diagnose why a hook never runs, fires twice, or works locally but breaks in CI.