troubleshooting

Solid

Systematic backend debugging — reproduce, isolate root cause, implement fix with regression test.

AI & Automation 14 stars 3 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
39
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Troubleshooting Skill > **Expertise:** Systematic debugging, log analysis, query profiling, memory/CPU profiling, regression tests. ## Debugging Framework (RRCA) ``` 1. REPRODUCE — make the bug happen reliably before touching code 2. REDUCE — find the smallest input that triggers the bug 3. CAUSE — identify the specific code line/condition responsible 4. ADDRESS — fix + regression test + verify fix doesn't reappear ``` Never fix what you can't reproduce. A guess-and-check fix is technical debt. ## Log Analysis Patterns ```bash # Find all errors in last hour (structured logs with jq) journalctl -u myapp --since "1 hour ago" | jq 'select(.level == "error")' # Count errors by type cat app.log | jq -r '.error_code' | sort | uniq -c | sort -rn | head -20 # Find slowest requests cat access.log | jq 'select(.duration > 1000)' | jq -r '[.method, .path, .duration] | @csv' # Trace a specific request by request_id grep "request_id=req_abc123" app.log # Find N+1 patterns: same query repeated many times in same request grep "request_id=req_abc123" app.log | grep "db.query" | wc -l # > 10 is suspicious ``` ## Database Query Debugging ```sql -- Show currently running queries (PostgreSQL) SELECT pid, now() - pg_stat_activity.query_start AS duration, query, state FROM pg_stat_activity WHERE state != 'idle' AND query_start < now() - interval '5 seconds' ORDER BY duration DESC; -- Kill a blocking query SELECT pg_terminate_backend(<pid>); -- Find slow queries from pg_st...

Details

Author
sawrus
Repository
sawrus/agent-guides
Created
3 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category