{"aiPlatform":"claude-code@2025.06","category":"debugging","commandName":"/smart-debug","content":"---\nname: Smart Debug\ndescription: Debug complex issues using specialized debugging agents with deep analysis capabilities, root cause identification, and performance issue support.\nallowed_tools:\n  - filesystem      # Access code files and debug logs\n  - memory          # Track debugging patterns and solutions\n  - sqlite          # Store debug sessions and issue resolutions\ntags:\n  - debugging\n  - root-cause-analysis\n  - performance-debugging\n  - multi-agent\n  - troubleshooting\ncategory: development\nversion: 2.0.0\nauthor: AI Commands Team\n---\n\nDebug complex issues using specialized debugging agents:\n\n[Extended thinking: This tool command leverages the debugger agent with additional support from performance-engineer when performance issues are involved. It provides deep debugging capabilities with root cause analysis.]\n\n## Debugging Approach\n\n### 1. Primary Debug Analysis\nUse Task tool with subagent_type=\"debugger\" to:\n- Analyze error messages and stack traces\n- Identify code paths leading to the issue\n- Reproduce the problem systematically\n- Isolate the root cause\n- Suggest multiple fix approaches\n\nPrompt: \"Debug issue: $ARGUMENTS. Provide detailed analysis including:\n1. Error reproduction steps\n2. Root cause identification\n3. Code flow analysis leading to the error\n4. Multiple solution approaches with trade-offs\n5. Recommended fix with implementation details\"\n\n### 2. Performance Debugging (if performance-related)\nIf the issue involves performance problems, also use Task tool with subagent_type=\"performance-engineer\" to:\n- Profile code execution\n- Identify bottlenecks\n- Analyze resource usage\n- Suggest optimization strategies\n\nPrompt: \"Profile and debug performance issue: $ARGUMENTS. Include:\n1. Performance metrics and profiling data\n2. Bottleneck identification\n3. Resource usage analysis\n4. Optimization recommendations\n5. Before/after performance projections\"\n\n## Debug Output Structure\n\n### Root Cause Analysis\n- Precise identification of the bug source\n- Explanation of why the issue occurs\n- Impact analysis on other components\n\n### Reproduction Guide\n- Step-by-step reproduction instructions\n- Required environment setup\n- Test data or conditions needed\n\n### Solution Options\n1. **Quick Fix** - Minimal change to resolve issue\n   - Implementation details\n   - Risk assessment\n   \n2. **Proper Fix** - Best long-term solution\n   - Refactoring requirements\n   - Testing needs\n   \n3. **Preventive Measures** - Avoid similar issues\n   - Code patterns to adopt\n   - Tests to add\n\n### Implementation Guide\n- Specific code changes needed\n- Order of operations for the fix\n- Validation steps\n\nIssue to debug: $ARGUMENTS","contentHash":"d8d8b7563ac40f53c523522bd671bbb678455b7e4e78aad33f0da18213764175","copies":0,"createdAt":"2025-08-12T16:09:44.338Z","description":"Deep debugging with debugger and performance subagents","github":{"repoUrl":"https://github.com/Commands-com/commands","lastSyncDirection":"from-github","metadata":{"importedFrom":"github_repository","repoPrivate":false,"repoDefaultBranch":"main","connectedAt":"2025-08-12T16:09:44.338Z"},"importedAt":"2025-08-12T16:09:44.338Z","lastSyncAt":"2025-08-17T17:57:47.627Z","fileMapping":{"license":null,"readme":null,"assets":[],"mainFile":"tools/smart-debug.md"},"selectedCommand":"smart-debug","fileShas":{"mainFile":"1d699ba7353d70ee4d627ace4f6090327e4a227a","yamlPath":"313647b1fb381389da33b7913e95baf617c4b392"},"branch":"main","connectionType":"commands_yaml","connected":true,"lastSyncCommit":"01591bc061d236bde47bf23b0f47e8afcf1a5144","importSource":"repository_import","installationId":"69232615","syncStatus":"synced"},"githubRepoUrl":"https://github.com/Commands-com/commands","id":"15ba95f6-f7ab-4c3a-813b-65cbdb54885f","instructions":"Deep debugging with debugger and performance subagents","likes":0,"mcp_search_content":"","organizationUsername":"commands-com","price":"free","search_content":"smart debug deep debugging with debugger and performance subagents /smart-debug debugging claude-code@2025.06","title":"Smart Debug","type":"command","updatedAt":"2025-08-17T17:57:47.627Z","userId":"W0V8NAw5AhWRwcuwSoFLOi1Yem83","visibility":"public","name":"smart-debug","userInteraction":{"userHasStarred":false}}