madappgang/claude-code/debug-mode
- community
Checking that the SKILL.md file is still in the repository.
Enable, disable, and manage debug mode for agentdev sessions. Records all tool invocations, skill activations, hook triggers, and agent delegations to JSONL. Use when debugging agent behavior, optimizing workflows, or analyzing session performance.
Install
npx vskill@latest install madappgang/claude-code/debug-modeSKILL.md
plugin: agentdev updated: 2026-01-20
AgentDev Debug Mode
Debug mode captures detailed session information for analysis, debugging, and optimization. All events are recorded to a JSONL file in claude-code-session-debug/.
Configuration
Debug mode uses per-project configuration stored in .claude/agentdev-debug.json.
Config File Format
Location: .claude/agentdev-debug.json (in project root)
Fields:
enabled: boolean - Whether debug mode is activelevel: string - Debug level (minimal, standard, verbose)created_at: string - ISO timestamp when config was created
Enabling Debug Mode
Use the command to create the config file:
This creates .claude/agentdev-debug.json with enabled: true.
Or manually create the file:
Debug Levels
| Level | Captured Events | |
|---|---|---|
minimal | Phase transitions, errors, session start/end | |
standard | All of minimal + tool invocations, agent delegations | |
verbose | All of standard + skill activations, hook triggers, full parameters |
Default level is standard.
Changing Debug Level
Using jq:
Output Location
Debug sessions are saved to:
Example:
JSONL Format
Each line in the JSONL file is a complete JSON event object. This append-only format is:
- Crash-resilient (no data loss on unexpected termination)
- Easy to process with
jq - Streamable during the session
Event Schema (v1.0.0)
Fields:
event_id: Unique UUID for this eventcorrelation_id: Links related events (e.g., tool_invocation -> tool_result)timestamp: ISO 8601 timestamptype: Event type (see below)data: Type-specific payload
Event Types
| Type | Description | |
|---|---|---|
session_start | Session initialization with metadata | |
session_end | Session completion | |
tool_invocation | Tool called with parameters | |
tool_result | Tool execution result | |
skill_activation | Skill loaded by agent | |
hook_trigger | PreToolUse/PostToolUse hook fired | |
agent_delegation | Task delegated to sub-agent | |
agent_response | Sub-agent returned result | |
phase_transition | Workflow phase changed | |
user_interaction | User approval/input requested | |
proxy_mode_request | External model request via Claudish | |
proxy_mode_response | External model response | |
error | Error occurred |
What Gets Captured
Session Metadata
- Session ID and path
- User request
- Environment (Claudish availability, plugin version)
- Start/end timestamps
Tool Invocations
- Tool name
- Parameters (sanitized - credentials redacted)
- Execution context (phase, agent)
- Duration and result size
Agent Delegations
- Target agent name
- Prompt preview (first 200 chars)
- Proxy mode model if used
- Session path
Proxy Mode
- Model ID
- Request/response duration
- Success/failure status
Phase Transitions
- From/to phase numbers and names
- Transition reason (completed, skipped, failed)
- Quality gate results
Errors
- Error type (tool_error, hook_error, agent_error, etc.)
- Message and stack trace
- Context (phase, agent, tool)
- Recoverability
Sensitive Data Protection
Debug mode automatically sanitizes sensitive data:
Redacted Patterns:
- API keys (
sk-*,ghp_*,AKIA*, etc.) - Tokens (bearer, access, auth)
- Passwords and secrets
- AWS credentials
- Slack tokens (
xox*) - Google API keys (
AIza*)
Analyzing Debug Output
Prerequisites
Install jq for JSON processing:
Quick Statistics
Tool Usage Analysis
Failed Operations
Timeline View
Event Correlation
Phase Duration Analysis
Agent Delegation Timing
Proxy Mode Performance
Disabling Debug Mode
Use the command:
Or manually update:
Or delete the config file:
Cleaning Up Debug Files
Remove All Debug Files
Remove Files Older Than 7 Days
Remove Files Larger Than 10MB
File Permissions
Debug files are created with restrictive permissions:
- Directory:
0o700(owner only) - Files:
0o600(owner read/write only)
This prevents other users from reading potentially sensitive session data.
Example Session Output
Troubleshooting
Debug File Not Created
- Check if debug mode is enabled:
``bash /agentdev:debug-status ``
- Verify config file:
``bash cat .claude/agentdev-debug.json ``
- Verify the directory is writable:
``bash ls -la claude-code-session-debug/ ``
jq Commands Not Working
- Install jq:
brew install jqorapt-get install jq - Verify JSONL format (each line should be valid JSON):
``bash head -1 session.jsonl | jq . ``
Large Debug Files
Debug files can grow large in verbose mode. Use minimal level for lighter capture:
Update config:
Or clean up old files regularly:
Integration with Other Tools
Viewing in VS Code
The JSONL format works with JSON syntax highlighting. For better viewing:
- Install "JSON Lines" VS Code extension
- Use "Format Document" on each line individually
Importing to Analytics
Streaming to External Service
Commands Reference
| Command | Description | |
|---|---|---|
/agentdev:debug-enable | Enable debug mode (creates config file) | |
/agentdev:debug-disable | Disable debug mode (updates config file) | |
/agentdev:debug-status | Check current debug mode status |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/agentdev/skills/debug-mode/SKILL.md
Popularity
- Repository stars
- 279
- Repository forks
- 32
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 14 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/madappgang/claude-code/debug-mode)