Files
claude-code/commands/debug.md
OpenCode Test c1a3c1812c Add /log and /debug commands for troubleshooting
- /log command to view and analyze automation logs
  - Filter by pattern, date, or log type
  - List available log files
- /debug command generates comprehensive debug report
  - Version, core files, state, memory, scripts status
  - Environment info (Python, kubectl)
  - Disk usage by directory
  - JSON output mode for scripting
- Updated shell completions with 13 aliases total
- Test suite now covers 21 tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:44:40 -08:00

49 lines
1.1 KiB
Markdown

---
name: debug
description: Debug and troubleshoot Claude Code configuration
aliases: [diag, diagnose]
invokes: skill:debug
---
# Debug Command
Generate a debug report for troubleshooting.
## Usage
```
/debug # Full debug report
/debug --paths # Show configuration paths
/debug --json # Output as JSON
```
## Implementation
Run the debug script:
```bash
~/.claude/automation/debug.sh [options]
```
## Report Sections
| Section | Contents |
|---------|----------|
| Version | Current configuration version |
| Core Files | Status of essential files |
| State Files | PA preferences, session context, autonomy |
| Memory Files | Preferences, decisions, projects, facts |
| Key Scripts | Executable status of automation scripts |
| Skills | List of available skills |
| Commands | Count of slash commands |
| Agents | Count of agent files |
| Environment | Shell, Python, kubectl status |
| Disk Usage | Space used by each directory |
## JSON Output
Use `--json` for machine-readable output, useful for:
- Automated health checks
- Monitoring integration
- Scripting