debug-trace

Toggle prompt tracing for the current Claude session via CLAUDE_ENABLE_TRACE.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/paulingham/.claude --skill debug-trace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-trace
Source: https://github.com/paulingham/.claude/tree/main/skills/debug-trace
Command: npx skills add https://github.com/paulingham/.claude --skill debug-trace

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a simple, on-demand way to enable or disable prompt tracing for the current Claude session, enabling auditability and debugging without constant overhead.

Core Features & Use Cases

  • Toggle tracing by setting CLAUDE_ENABLE_TRACE to 1 or 0 for the active session.
  • Persist trace outputs under the user's home directory at metrics/{session-id}/trace for later review.
  • Privacy-aware by defaulting to off and requiring explicit activation during investigation.

Quick Start

Turn tracing on for the current session by invoking the skill with on.

Frequently Asked Questions about debug-trace

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

FAQPage Schema
How do I enable prompt tracing for a Claude session?

To enable prompt tracing for a Claude session, you can invoke the skill with the on command to set CLAUDE_ENABLE_TRACE to 1. This turns tracing on for the active session, allowing you to audit prompts and debug agent failures on demand.

Where are Claude trace outputs stored when debugging agent failures?

Claude trace outputs are stored under the user's home directory at ~/.claude/metrics/{session-id}/trace. Trace files are written to this path when tracing is explicitly enabled, providing a localized record for forensic review.

Is prompt tracing on by default for Claude sessions?

Prompt tracing is not on by default for Claude sessions. It defaults to off to ensure privacy and minimize overhead, requiring explicit activation only when you need to investigate agent failures or verify prompts.

What is the best way to verify prompts during a Claude session?

The best way to verify prompts during a Claude session is to toggle prompt tracing on. This adjusts CLAUDE_ENABLE_TRACE to 1, capturing trace outputs for the active session so you can review the exact prompts being processed.

Can I disable session tracing after completing prompt forensics?

Yes, you can disable session tracing after completing prompt forensics by invoking the skill with the off command. This sets CLAUDE_ENABLE_TRACE to 0, turning tracing off to restore privacy and reduce system overhead.