Agent skill

debug

Debug a specific issue by reading logs and investigating code

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/debug-pjpj42-gridracer

SKILL.md

Debug GridRacer Issue

Investigate and diagnose a specific problem.

Arguments

$ARGUMENTS - Description of the issue to debug

Steps

1. Reproduce and Capture

bash
# Launch with console logging
xcrun simctl launch --console booted trouarat.GridRacer 2>&1 | head -100

Or take a screenshot to see current state:

  • Use mcp__automation__screenshot to capture the game

2. Gather Context

  • Search codebase for related code
  • Read relevant Swift files
  • Check recent git changes: git log --oneline -10

3. Form Hypothesis

Based on:

  • Error messages in console
  • Visual state in screenshot
  • Code analysis

4. Verify

  • Add print statements or breakpoints conceptually
  • Trace execution path
  • Check edge cases

5. Report

Provide:

  • Root cause: Why the bug occurs
  • Location: File and line number
  • Fix: Specific code change needed
  • Verification: How to confirm the fix works

6. Create Issue (Optional)

After completing investigation, offer:

🐛 Investigation Complete

Root Cause: [Identified cause]
Location: [File:line]
Suggested Fix: [Proposed solution]

Create GitHub issue to track this bug? [Y/n]

If yes:

bash
gh issue create \
  --title "BUG: [Short summary from investigation]" \
  --template bug_report.md \
  --label "bug" \
  --body "$(cat <<'EOF'
## Bug Analysis

**Root Cause**: [Identified cause from investigation]

**Location**: [File path and line number]

**Steps to Reproduce**:
1. [Step 1 from debugging]
2. [Step 2]

**Expected**: [What should happen]
**Actual**: [What happens]

**Suggested Fix**:
[Proposed solution with code snippet if applicable]

**Related Files**:
- `[file path]:[line]`

**Discovered via**: /debug skill

---
[Additional context from investigation]
EOF
)"

Output: "✓ Issue #N created. Start work with: /work-on N"

Component Label Auto-Detection: Based on investigation findings, add relevant labels:

  • Collision issues → add collision-detection
  • SceneKit issues → add scenekit
  • Game logic issues → add game-logic
  • UI issues → add ui

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results