debug-systematically
Diagnose a BiteCampus bug from evidence to root cause before changing code, and teach the owner the debugging steps.
SKILL.md.claude/skills/debug-systematically/SKILL.md
GitHubDebug workflow
- Capture the exact error, steps to reproduce, and expected vs actual result.
- Find the request in logs by
requestId; check the browser Network tab, the API response body and the server log. - Trace the path: UI → API route → service → database. Say which layer you suspect and why.
- Form 1–3 hypotheses; run the cheapest check that tells them apart (a log line, a SQL query, a failing test).
- Write a failing regression test that reproduces the bug.
- Make the smallest fix for the root cause (no broad try/catch, no symptom patches).
- Run the regression test and neighbouring tests; show the output.
- Explain the root cause, why the fix works, and how to spot this class of bug next time (see
docs/learning/DEBUGGING_GUIDE.md).