debugging-and-error-recovery

Diagnose test failures, build errors, and runtime bugs through structured root-cause triage.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/alissonpef/copilot_agent_skills --skill debugging-and-error-recovery-alissonpef
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/alissonpef/copilot_agent_skills/tree/main/.github/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/alissonpef/copilot_agent_skills --skill debugging-and-error-recovery-alissonpef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When tests fail, builds break, or runtime behavior goes wrong, developers often guess at fixes or patch symptoms instead of root causes, wasting hours and letting bugs compound. This Skill enforces a disciplined stop-the-line debugging process that preserves evidence, isolates the failure, and fixes the actual cause. ## Core Features & Use Cases - Structured Triage Checklist: A six-step ordered process (reproduce, localize, reduce, fix root cause, guard, verify) that prevents skipped steps and premature fixes. - Error-Specific Decision Trees: Dedicated triage flows for test failures, build failures, and runtime errors, plus guidance for non-reproducible and flaky bugs. - Regression Guarding: Requires a failing-without-the-fix regression test and end-to-end verification before resuming feature work. - Use Case: A CI build breaks after a merge. Instead of guessing, you follow the checklist: reproduce locally, bisect the offending commit with git bisect, reduce to a minimal failing case, fix the root cause, and add a regression test before pushing. ## Quick Start Use the debugging skill to triage this failing test and find the root cause instead of guessing at a fix.

Frequently Asked Questions about debugging-and-error-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a failing test systematically?▼

Follow an ordered triage process: reproduce the failure reliably, localize which layer is failing, reduce to a minimal failing case, fix the root cause, add a regression test, then verify the full suite passes. Running the specific test in isolation with --runInBand rules out test pollution.

How to find which commit introduced a bug with git bisect?▼

Run git bisect start, mark the current commit bad and a known-working commit good, then let git checkout midpoint commits while you run the failing test at each step. git bisect run can automate this by executing your test command at every midpoint.

What should I do when a bug is not reproducible?▼

Classify why it is non-reproducible: timing-dependent bugs need artificial delays and load testing, environment-dependent bugs need version and config comparison, and state-dependent bugs need isolation from shared state. If truly random, add defensive logging and monitor for recurrence.

Why is fixing symptoms instead of root causes a problem?▼

Symptom fixes mask the underlying defect, so the bug resurfaces elsewhere and compounds with later changes. Asking why the failure happens until reaching the actual cause, such as fixing a duplicating JOIN query rather than deduplicating in the UI, prevents recurrence.

When should I remove debug logging from my code?▼

Remove instrumentation once the bug is fixed and a regression test guards against recurrence, or when logs are only useful during development. Always remove logs containing sensitive data, but keep permanent instrumentation like error boundaries and API error logging.