debugging-and-error-recovery

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

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/JacobThree/zero-bloat-mcp-stack --skill debugging-and-error-recovery-jacobthree
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/JacobThree/zero-bloat-mcp-stack/tree/main/ai_blueprints/agent-skills/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/JacobThree/zero-bloat-mcp-stack --skill debugging-and-error-recovery-jacobthree

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. This Skill enforces a systematic debugging process that preserves evidence, isolates the failure, and prevents recurrence. ## Core Features & Use Cases - Structured Triage Checklist: A six-step process covering reproduce, localize, reduce, fix root cause, guard with regression tests, and verify end-to-end. - Error-Specific Decision Trees: Targeted triage flows for test failures, build failures, runtime errors, and non-reproducible bugs including timing, environment, and state-dependent issues. - Safe Fallback and Instrumentation Patterns: Guidance on graceful degradation, defensive defaults, and when to add or remove diagnostic logging. - Use Case: A test suite fails after a refactor. Instead of guessing, follow the checklist to reproduce the failure, bisect the offending commit with git bisect, reduce to a minimal case, fix the root cause, and add a regression test. ## Quick Start Ask the AI to systematically debug the failing test or broken build using the root-cause triage process 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?▼

Start by reproducing the failure reliably, then localize which layer is failing, reduce to a minimal failing case, and fix the root cause rather than the symptom. Finish by adding a regression test that fails without the fix and verifying the full suite passes.

How to find which commit introduced a bug?▼

Use git bisect to binary-search the commit history. Mark the current commit as bad and a known working commit as good, then run your failing test at each midpoint with git bisect run to automatically identify the offending commit.

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

Classify whether it is timing-dependent, environment-dependent, state-dependent, or truly random. Add timestamps and logging around the suspected area, compare environments and Node versions, check for leaked shared state, and set up alerts for the error signature.

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

Symptom fixes mask the underlying issue, so the bug resurfaces elsewhere and compounds with later changes. Asking why the failure happens until reaching the actual cause, such as fixing a faulty query instead of 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.