Claude Code Session Debugging

VerifiedSafe

Enable debug logging and help diagnose issues in the current Claude Code session.

Sby Skills Guide Bot
DevelopmentBeginner
8/29/2026
Claude Code
#debugging#logging#troubleshooting#claude-code#diagnostics

Recommended for

Automated summary

Turns on debug logging for the current Claude Code session and helps diagnose problems by reading the resulting log file.

Strengths

  • Enables session debug logging and reports the exact log path
  • Scans the log for [ERROR] and [WARN] entries, stack traces and failure patterns
  • Checks whether the background daemon is running and points to its log
  • Reminds where user, project and local settings files live

Limitations

  • Nothing before the invocation is captured, so the issue must be reproduced afterwards
  • The log file may not exist yet when the skill first runs
  • Tightly scoped to Claude Code internals, not to debugging arbitrary applications
When to use it

Use it when a Claude Code session misbehaves — hooks, background agents, silent failures — and you need real log evidence.

When not to use it

Avoid it when the bug lives in your own project's code rather than in Claude Code's own behavior.

Security analysis

Safe
Quality score74/100

The skill is a read-only diagnostic workflow: it inspects debug logs, greps for [ERROR]/[WARN] lines, points at settings files, and optionally launches a subagent. There are no destructive commands, no network calls, no credential transmission, and no attempts to disable safety controls. The only mild concern is that it pulls local settings/log files into context, which is normal for debugging and carries no exfiltration path.

Findings
  • •Instructs the agent to read Claude Code settings files (user/project/local settings.json), which can contain environment variables or API keys; contents would enter the model context, though nothing is sent externally.
  • •References an undefined template variable {debug_log_path} and a possible daemon log path; if unresolved, the agent may grep arbitrary paths under the user home directory.
How this analysis is made

Examples

Session failures
/debug my Claude Code session keeps erroring out whenever I run the test suite — can you look at the logs and tell me what's going wrong?
Hooks not firing
/debug my PostToolUse hook never seems to run. Enable debug logging, I'll reproduce it, then check the log for warnings.
Background agents
/debug the background agents I started aren't showing up. Check whether the daemon is running and read its log.

name: debug description: Enable debug logging for this session and help diagnose issues

Debug Skill

Help the user debug an issue they're encountering in this current Claude Code session.

Debug Logging Just Enabled

Debug logging was OFF for this session until now. Nothing prior to this /debug invocation was captured.

Tell the user that debug logging is now active at {debug_log_path}, ask them to reproduce the issue, then re-read the log. If they can't reproduce, they can also restart with claude --debug to capture logs from startup.

Session Debug Log

The debug log for the current session is at: {debug_log_path}

No log file exists yet.

For additional context, grep for [ERROR] and [WARN] lines across the full file.

Daemon

No daemon lock or status file found — the background daemon does not appear to be running. If the issue involves background sessions or claude agents, the daemon log (if any) is at {user_home}/.claude/daemon.log.

Issue Description

The user did not describe a specific issue. Read the debug log and summarize any errors, warnings, or notable issues.

Settings

Remember that settings are in:

  • user - {user_home}/.claude/settings.json
  • project - {working_directory}/.claude/settings.json
  • local - {working_directory}/.claude/settings.local.json

Instructions

  1. Review the user's issue description
  2. The last 20 lines show the debug file format. Look for [ERROR] and [WARN] entries, stack traces, and failure patterns across the file
  3. Consider launching the claude-code-guide subagent to understand the relevant Claude Code features
  4. Explain what you found in plain language
  5. Suggest concrete fixes or next steps

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/claude-code-session-debugging-mte1litu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/claude-code-session-debugging-mte1litu/download' --output '.skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md.part' && mv '.skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md.part' '.skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md' && test -s '.skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/debug' && cp -R '.skill-downloads/claude-code-session-debugging-mte1litu' '.claude/skills/debug'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/claude-code-session-debugging-mte1litu'

openskills read 'claude-code-session-debugging-mte1litu'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/claude-code-session-debugging-mte1litu/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills