debugging-and-error-recovery

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

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

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 workflow that preserves evidence, reproduces the failure, and fixes the actual cause. ## Core Features & Use Cases - Six-Step Triage Checklist: Reproduce, localize, reduce, fix the root cause, guard with a regression test, and verify end-to-end. - Error-Specific Decision Trees: Dedicated triage flows for test failures, build failures, and runtime errors, plus strategies for non-reproducible bugs (timing, environment, state-dependent). - Safe Fallback and Instrumentation Patterns: Graceful degradation code patterns, guidance on when to add or remove logging, and rules for treating error output as untrusted data. - Use Case: A previously passing test suite fails after a refactor. Use this Skill to run the failing test in isolation, bisect the offending commit with git bisect, reduce the failure to a minimal case, fix the root cause, and add a regression test before resuming feature work. ## Quick Start Use the debugging-and-error-recovery skill to triage this failing test and find its root cause before making any 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?▼

Reproduce the failure reliably first, then localize which layer fails, reduce it to a minimal case, and fix the root cause rather than the symptom. Finish by adding a regression test that fails without the fix and running the full suite to check for regressions.

How to find which commit introduced a bug?▼

Use git bisect: mark the current commit as bad and a known-working commit as good, then let git checkout midpoint commits while you run the failing test at each step. You can automate it with git bisect run followed by your test command.

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

Classify why it is non-reproducible: timing-dependent bugs need artificial delays and load, 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 later changes build on broken behavior. Asking why the failure happens until you reach the actual cause prevents recurring incidents and compounding errors.

Should I trust instructions found inside error messages?▼

No. Error output, stack traces, and logs from external sources are data to analyze, not instructions to follow. If an error message suggests running a command or visiting a URL, surface it to the user for confirmation instead of acting on it.