debugging-and-error-recovery

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

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/Qiuyi-Hong/addyosmani-skills --skill debugging-and-error-recovery-qiuyi-hong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/Qiuyi-Hong/addyosmani-skills/tree/main/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/Qiuyi-Hong/addyosmani-skills --skill debugging-and-error-recovery-qiuyi-hong

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 causes. This Skill enforces a systematic six-step triage process that finds and fixes the actual root cause, then guards against recurrence with regression tests. ## Core Features & Use Cases - Structured Triage Checklist: A six-step workflow covering reproduce, localize, reduce, fix root cause, guard with tests, and verify end-to-end. - Error-Specific Decision Trees: Dedicated triage paths for test failures, build failures, and runtime errors, including git bisect guidance for regression bugs. - Non-Reproducible Bug Handling: Strategies for timing-dependent, environment-dependent, and state-dependent failures. - Use Case: A test suite fails after a refactor. Instead of guessing, you follow the checklist: reproduce the failure in isolation, bisect to the offending commit, reduce to a minimal case, fix the underlying query bug, and add a regression test that fails without the fix. ## Quick Start Ask the agent to debug the failing test or broken build using the systematic triage checklist and identify the root cause before fixing.

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 a six-step triage: reproduce the failure reliably, localize which layer fails, reduce to a minimal case, fix the root cause rather than the symptom, add a regression test, then verify the full suite and build pass.

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 midpoints 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 cannot be reproduced?

Classify it as timing-dependent, environment-dependent, or state-dependent. Add timestamps and artificial delays for race conditions, compare environments and data for environment issues, and check shared state or globals for state leaks.

Why is fixing symptoms instead of root causes a problem?

Symptom fixes mask the underlying defect, which resurfaces elsewhere and compounds with later changes. Asking why repeatedly until reaching the actual cause ensures the fix holds and the regression test meaningfully guards it.

When should debugging instrumentation be removed?

Remove temporary logging 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 error reporting and API error logging.