Debugging / Troubleshooting Skill
Debug workflow (repeatable)
- •Identify symptom and scope:
- •endpoint, status code, frequency, affected users
- •Reproduce:
- •minimal request (curl/httpie) with captured request_id
- •Observe:
- •logs filtered by request_id
- •confirm error_code and failure point (router/service/infra)
- •Narrow:
- •disable non-essential features (feature flags if present)
- •isolate external dependencies (mock or stub)
- •Fix:
- •minimal patch
- •add regression test
- •Verify:
- •happy path + failure path
- •ensure logs/audit still correct
Logging requirements for troubleshooting
- •Unexpected exceptions must include stack trace on server logs.
- •Include duration_ms and status for all requests.
- •Ensure request_id is returned to client.
Debug toggles (safe)
- •Use environment variables for:
- •log level
- •feature flags
- •enabling extra debug fields (never secrets)
Output expectations
When asked to debug, respond with:
- •Hypotheses ranked
- •Required evidence/logs
- •Minimal reproduction command
- •Proposed fix and a test case