skills/debug/SKILL.md
Debug and diagnose the Dispatch personal assistant system. Troubleshoot sessions, trace messages, find incidents, check daemon health.
npx skillsauth add svenflow/dispatch debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
debug status # System dashboard
debug trace <phone> --since 1h # End-to-end message trace
debug session imessage/<phone> # Session deep-dive
debug incident --since 2h # Auto-scan for anomalies
debug routing <phone> # Contact routing info
All commands support --json for machine-readable output, --verbose for more detail, --quiet for terse output.
| Command | Description |
|---------|-------------|
| debug status | Daemon PID/uptime/memory, watchdog, signal, sessions table, bus stats, open FDs |
| debug trace <chat_id> | Message journey: chat.db -> bus -> session -> response. Timeline with latency |
| debug session <name\|chat_id> | Session info, recent bus events, sdk_events, log tail, compaction info |
| debug incident | Auto-detect: failed messages, crashed sessions, heartbeat gaps, restart loops, errors |
| debug routing <chat_id> | Contact lookup, tier, session assignment, transcript dir, backend |
debug incident --since 30m # Find crash events
debug session <name> # Check session state & logs
# If session exists but is dead:
claude-assistant restart-session <name>
# If repeated crashes:
debug trace <chat_id> --since 2h # Find what triggered it
debug trace <chat_id> --since 1h # Find the gap
debug session <name> # Is session alive?
# Check if message.received exists but no message.sent:
# Gap between received and injected = routing issue
# Gap between injected and turn_complete = session stuck
# No message.sent after turn_complete = Claude didn't call send-sms
debug status # Check PID, memory, FDs
# If PID exists but high memory/FDs:
claude-assistant restart
# If no PID:
claude-assistant start
# Check watchdog:
~/dispatch/bin/watchdog-status
debug status # Check resource usage
debug trace <chat_id> --since 1h # Find latency bottlenecks
# Check perf logs:
tail -20 ~/dispatch/logs/perf-$(date +%Y-%m-%d).jsonl | python3 -m json.tool
debug incident --since 1h # Detects restart loops automatically
debug session <name> # Check consecutive error count
# Look for session.created events close together:
# If 3+ restarts in 5 min = restart loop
# Common cause: context_length_exceeded, image_too_large
debug session <name> # Check last_inject vs last_response
debug trace <chat_id> --since 30m # Find where it got stuck
# session.injected with no sdk.turn_complete = stuck
claude-assistant restart-session <name>
development
Use when building React/Next.js components, dashboards, admin panels, apps, or any web interface. Trigger words - react, frontend, ui, dashboard, component, interface, web app, polish, audit, design review.
tools
Track flight status and get FlightAware links. Use when asked about flights, flight status, arrival times, or flight tracking. Trigger words - flight, flying, UA, AA, DL, landing, arriving, departure.
development
Query real-time locations of people sharing via Find My. Look up where someone is, reverse geocode GPS coordinates, set up geofence alerts. Trigger words - findmy, find my, location, where is, geofence, track location.
tools
Access Figma designs via MCP or Chrome. Use when asked about Figma files, design mockups, wireframes, or UI designs. Trigger words - figma, design, mockup, wireframe, UI design, FigJam.