Analyze, reproduce, and report bugs with precision.
✅ USE this skill when:
❌ DON'T use this skill when:
test-case-genapi-testerWhen writing a bug report, use this structure:
markdown
## 🐛 Bug Report
**Title**: [Module] Brief description of the issue
**Severity**: 🔴 Critical / 🟠 Major / 🟡 Minor / 🟢 Trivial
**Priority**: P0-Blocker / P1-High / P2-Medium / P3-Low
**Environment**: OS / Browser / App Version / API Version
**Reporter**: 虫探 🔍
**Date**: YYYY-MM-DD
### Description
Clear, concise description of what went wrong.
### Steps to Reproduce
1. Step one (be specific: URL, button name, exact input)
2. Step two
3. Step three
### Test Data
- Account: xxx
- Input: xxx
### Expected Result
What should happen.
### Actual Result
What actually happened. Include error messages verbatim.
### Evidence
- Screenshot: [attached]
- Log snippet:
\`\`\`
ERROR 2024-01-01 10:00:00 NullPointerException at UserService.java:42
\`\`\`
### Root Cause Analysis (if identified)
- Location: file:line
- Cause: description
- Impact scope: what else might be affected
### Suggested Fix (if obvious)
Brief suggestion for the developer.
PatternLikely CauseActionNullPointerExceptionNull reference not handledCheck null checks, data flowConnectionTimeoutNetwork/service issueCheck service health, timeout configOutOfMemoryErrorMemory leak or insufficient heapAnalyze heap dump, check for leaksDeadlockExceptionConcurrent resource contentionReview lock ordering, transaction scope401 UnauthorizedToken expired/invalidCheck auth flow, token refresh429 Too Many RequestsRate limitingCheck request frequency, add throttlingCORS errorCross-origin misconfigurationCheck server CORS headers
bash
# Quick log analysis commands
# Find errors in log file
grep -n -i "error\|exception\|fatal\|failed" app.log | tail -20
# Count error types
grep -oP '\w+Exception' app.log | sort | uniq -c | sort -rn
# Find errors in time range
awk '/2024-01-01 10:0[0-5]/' app.log | grep -i error
# Get context around an error (5 lines before and after)
grep -B5 -A5 "NullPointerException" app.log
SeverityDefinitionExample🔴 CriticalSystem crash, data loss, security breach, no workaroundPayment charged but order not created🟠 MajorCore feature broken, has workaroundLogin fails on Chrome but works on Firefox🟡 MinorNon-core feature issue, cosmetic with functional impactSort order wrong on list page🟢 TrivialCosmetic only, typo, UI alignmentButton color slightly off
text
High Impact Low Impact
High Frequency → P0 Fix Now P1 Fix Soon
Low Frequency → P1 Fix Soon P2/P3 Backlog
When analyzing root cause, classify into:
When provided with screenshots:
Use the image tool to analyze screenshots, then include findings in the bug report's Evidence section.
When analyzing API errors:
bash
# Save full request + response for bug report
curl -v -X POST "https://api.example.com/endpoint" \
-H "Content-Type: application/json" \
-d '{"key": "value"}' 2>&1 | tee /tmp/api-debug.log
# Key things to capture:
# - Request URL, method, headers, body
# - Response status code, headers, body
# - Timing information
# - Any redirect chain
Common API error patterns:
StatusCheckLikely Root Cause400Request body/paramsValidation logic or schema mismatch401Auth headerToken expired, wrong auth scheme403PermissionsRBAC config, resource ownership404URL pathRoute not registered, wrong ID409Business logicDuplicate entry, state conflict422Validation detailSemantic validation (format, range)500Server logsUnhandled exception, null ref, DB error502/503InfrastructureUpstream service down, deployment in progress