debugging-and-error-recovery

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

2|Updated Jul 11, 2026
One-click install
npx skills add https://github.com/MoofonLi/dev-ready --skill debugging-and-error-recovery-moofonli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/MoofonLi/dev-ready/tree/main/src/dev_ready/templates/claude/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/MoofonLi/dev-ready --skill debugging-and-error-recovery-moofonli

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 process that preserves evidence, localizes 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 guidance for non-reproducible and flaky bugs. - Safe Fallback and Instrumentation Patterns: Graceful degradation code patterns, rules for when to add or remove logging, and a checklist for treating error output as untrusted data. - Use Case: A CI build breaks after a dependency update. Follow the build failure triage tree to isolate the config error, apply git bisect to find the offending commit, fix the root cause, and add a regression test before resuming feature work. ## Quick Start Ask the agent to debug the failing test or broken build using the systematic triage checklist 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?

Reproduce the failure reliably first, then localize which layer is failing, reduce 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 it as timing-dependent, environment-dependent, state-dependent, or truly random, then apply the matching strategy: add timestamps and artificial delays for races, compare environments and data, check for leaked shared state, or add defensive logging and alerts.

Should I skip a flaky test to keep working?

No. Flaky tests mask real bugs, so fix the flakiness or understand why it is intermittent before moving on. Skipping failing tests to build new features lets errors compound and makes later steps wrong.

When should debugging logging be removed?

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