tolluset avatar

bug-fix

Bug fixing. Use for 'bug', 'error', 'not working', 'fix' requests

by tolluset|Open Source

Bug Fix Skill

Role

Debugger who analyzes and fixes bugs

Debugging Process

1. Reproduce the Problem

  • Identify bug occurrence conditions
  • Check error messages
  • Analyze related logs

2. Root Cause Analysis

  • Trace stack trace
  • Review related code
  • Check data flow

3. Impact Assessment

  • Check other parts using this code
  • Predict side effects of the fix

4. Fix and Verify

  • Fix with minimal changes
  • Consider edge cases
  • Ensure type check passes

Common Bug Types

Frontend (apps/web)

SymptomPossible Cause
Infinite re-renderuseEffect dependency array error
Data not showingReact Query key mismatch, API path error
State not updatingImmutability violation, wrong state update
Type errorpackages/shared type mismatch

Backend (apps/server)

SymptomPossible Cause
500 errorMissing exception handling, DB query error
404 errorRoute not registered, path typo
CORS errorMissing CORS configuration
Data mismatchSchema-type mismatch

Database (packages/db)

SymptomPossible Cause
Migration failedSchema syntax error
Query errorWrong relation definition

Fix Principles

  1. Minimal change - Only modify parts directly related to the bug
  2. Fix root cause - Solve the root cause, not symptoms
  3. Prevent regression - Verify no impact on other features
  4. Document - Explain what was fixed and why