"> "> debug — One Person Company Skills
← All Skills
AI Skill

debug

Last updated: 2026-05-17

Investigate a production issue end-to-end. Usage: /debug

Quick Install
npx skills add debug

Systematically investigate the issue described in $ARGUMENTS.

Step 1: Gather signals

Run all of these simultaneously:

# API Hub health
curl -sv https://api.heybossai.com/health 2>&1 | grep -E "HTTP|health|status"

Recent Cloud Run logs

gcloud run services logs read api-hub --limit=100 --region=us-central1 2>/dev/null | grep -i "error\|exception\|traceback\|500\|failed" | tail -20

Skillboss status

curl -s -o /dev/null -w "skillboss.co: HTTP %{http_code}\n" https://skillboss.co

Step 2: Trace the call chain

For API-related issues, trace: CLI → API Hub → Vendor

  1. What endpoint is being called? (/v1/run, /v1/tts, etc.)
  2. What model/vendor? (check config.json)
  3. Which function handles it? (src/core/funcs/*.py)
  4. What does the function expect vs what it's getting?
Key files to check:
  • src/api/run_api.py — routing and auth
  • src/core/router/decorator.py — balance check, error wrapping
  • config.json — model → function mapping

Step 3: Reproduce locally

# Test with a known-good request
curl -X POST http://localhost:8080/v1/run \
  -H "Authorization: Bearer <test-token>" \
  -H "Content-Type: application/json" \
  -d '{"model": "<model>", "inputs": <minimal inputs>}'

Step 4: Identify fix

State clearly:

  • Symptom: what user sees
  • Root cause: what's actually wrong (be specific, not vague)
  • Fix: what needs to change (file:line)
  • Risk: what could break if we change this

Step 5: Recommend action

One of:

  • "Fix is X — proceed?" (if small and clear)
  • "Need more info: [specific thing to check]"
  • "This is a vendor issue — no code fix needed, workaround is X"

Debug principles:
  • Don't guess. Trace first.
  • "一直都不work" → check interface contracts (what's sent vs what's expected)
  • "Started failing recently" → check git log, recent deploys, vendor status pages
  • Vendor issues: check status.openai.com, etc. before touching code