debug
Installation
SKILL.md
Production Debugging Skill
Use Case: Investigating production issues, reproducing bugs from ticket information, and planning test cases.
Core Debugging Workflow
Phase 1: Understand & Reproduce
- Intake: Gather error logs, user reports, and environment details (Browser, OS, Staging/Prod).
- Reproduce: Replicate the exact conditions. Write failing test cases to prove the bug exists before touching any application code.
- If Frontend: Look for race conditions in React hooks, stale closures, missing keys, or CORS.
- If Backend: Look for N+1 queries, missing indexes, race conditions, or null reference errors.
Phase 2: Root Cause Analysis (5 Whys)
Do not just patch the error. Determine why it happened.
- Why did the variable evaluate to null?
- Why did the database allow a null value?
- Why was validation missing?