debug-hooks

debug-hooks is a skill for Claude Code from parcadei/Continuous-Claude-v3. It costs 23 tokens per session (979 once invoked), scanned B, original, MIT.

A step-by-step workflow for diagnosing Claude Code hooks that do not run or produce unexpected results. Hooks are scripts that run automatically when specified events occur.

In plain words
What is it for?
Use it to troubleshoot session, tool-use, and prompt-related hooks by checking project and global configuration and logs.
Why use it?
It directs you to inspect outputs, registrations, files, and manual test results before changing the hook code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to troubleshoot session, tool-use, and prompt-related hooks by checking project and global configuration and logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/parcadei/continuous-claude-v3/debug-hooks
About the project

Continuous-Claude-v3 is a Claude Code development environment that preserves working context between sessions, coordinates specialized agents, and stores project knowledge through ledgers, handoffs, and analysis tools. It is for people using Claude Code on ongoing or complex software work. Its catalogue entries are the skills, agents, hooks, plugin, and setting that provide its workflows and orchestration.

parcadei/Continuous-Claude-v3 · 3,938 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add parcadei/Continuous-Claude-v3 --skill debug-hooks
Clone the repo
git clone --depth 1 https://github.com/parcadei/Continuous-Claude-v3

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debug-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/debug-hooks/github.svg)](https://agentmods.dev/skills/parcadei/continuous-claude-v3/debug-hooks)
Your own site
<a href="https://agentmods.dev/skills/parcadei/continuous-claude-v3/debug-hooks"><img src="https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/debug-hooks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug-hooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/parcadei/continuous-claude-v3/debug-hooks"><img src="https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/debug-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 979 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 15 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00979
Opus 5 $0.00012 $0.00490
Sonnet 5 $0.00005 $0.00196
Haiku 4.5 $0.00002 $0.00098

Measured 9d ago against content hash a5fb9b2e96be, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

debug-hooks scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

tail $CLAUDE_PROJECT_DIR/.claude/cache/*.log 2>/dev/null
.claude/skills/debug-hooks/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

# Check project cache
ls -la $CLAUDE_PROJECT_DIR/.claude/cache/

# Check specific outputs
ls -la $CLAUDE_PROJECT_DIR/.claude/cache/learnings/

# Check for debug logs
tail $CLAUDE_PROJECT_DIR/.claude/cache/*.log 2>/dev/null

# Also check global (common mistake: wrong path)
ls -la ~/.claude/cache/ 2>/dev/null

2. Verify Hook Registration

# Project settings
cat $CLAUDE_PROJECT_DIR/.claude/settings.json | grep -A 20 '"SessionEnd"\|"PostToolUse"\|"UserPromptSubmit"'

# Global settings (hooks merge from both)
cat ~/.claude/settings.json | grep -A 20 '"SessionEnd"\|"PostToolUse"\|"UserPromptSubmit"'

3. Check Hook Files Exist

# Shell wrappers
ls -la $CLAUDE_PROJECT_DIR/.claude/hooks/*.sh

# Compiled bundles (if using TypeScript)
ls -la $CLAUDE_PROJECT_DIR/.claude/hooks/dist/*.mjs

4. Test Hook Manually

# SessionEnd hook
echo '{"session_id": "test-123", "reason": "clear", "transcript_path": "/tmp/test"}' | \
  $CLAUDE_PROJECT_DIR/.claude/hooks/session-end-cleanup.sh

# PostToolUse hook (Write tool example)
echo '{"tool_name": "Write", "tool_input": {"file_path": "test.md"}, "session_id": "test-123"}' | \
  $CLAUDE_PROJECT_DIR/.claude/hooks/handoff-index.sh

5. Check for Silent Failures

If using detached spawn with stdio: 'ignore':

// This pattern hides errors!
spawn(cmd, args, { detached: true, stdio: 'ignore' })

Fix: Add temporary logging:

const logFile = fs.openSync('.claude/cache/debug.log', 'a');
spawn(cmd, args, {
  detached: true,
  stdio: ['ignore', logFile, logFile]  // capture stdout/stderr
});

6. Rebuild After Edits

If you edited TypeScript source, you MUST rebuild:

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 124 lines · 23 tokens per session scan B a5fb9b2e96be

Subscribe to this mod's changes

debug-hooks is a skill published in the GitHub repository parcadei/Continuous-Claude-v3 (3,938 stars, last pushed 7mo ago), licensed MIT. It adds 23 tokens to every session and 979 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

prove-checks

Prove a passing check was capable of failing before recording it as evidence. Use when a test, CI job, build-and-diff, smoke test or rehearsal comes back green and that green is about to be treated as proof - especially when the check depends on a setup mutation (a sed/awk rewrite, an env var, a secret, a fixture…

sergeyklay/.agents · 221 tokens

headsup-diagnose

Actively test the Codex headsup stack by flashing idle, working, and waiting tab colors and checking daemon application.

wasulajr/headsup · 30 tokens

headsup-status

Print a read-only health snapshot for the Codex headsup hook stack: daemon, watchdog, sessions, notifications, and logs.

wasulajr/headsup · 30 tokens

debugging-and-recovery

Use when something is broken, a test is failing, behavior is wrong, when investigating a production incident, when a user reports a bug, when a feature works locally but not in another environment, or when the system behaves differently than the contract specifies.

aneja5/forge-skills · 56 tokens

prod-debug

Production debugging skill. Pre-loads DB schema, container registry, and prod environment facts from .claude/prod-debug/ in the current project root. Use when the user invokes /prod-debug or /prod-debug bootstrap.

josephfung/trimkit · 48 tokens

error-handling-and-resilience

Use when establishing error handling patterns for a project, when adding retry logic, circuit breakers, or graceful degradation, when reviewing how a service handles failures, or when an incident reveals that a failure mode was silently swallowed.

aneja5/forge-skills · 50 tokens