debugging-and-error-recovery

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

2|Updated Jul 1, 2026
One-click install
npx skills add https://github.com/Lazare-Panam/mars-api --skill debugging-and-error-recovery-lazare-panam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/Lazare-Panam/mars-api/tree/main/Mars.API/.claude/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/Lazare-Panam/mars-api --skill debugging-and-error-recovery-lazare-panam

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 disciplined stop-the-line process 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: Structured triage flows for test failures, build failures, runtime errors, and non-reproducible bugs (timing, environment, or state dependent). - Regression Guardrails: Guidance on writing tests that fail without the fix, safe fallback patterns, instrumentation rules, and treating error output as untrusted data. - Use Case: A test suite fails after a refactor. Instead of guessing, you follow the checklist to reproduce the failure in isolation, bisect the offending commit with git bisect, fix the root cause, and add a regression test before resuming feature work. ## Quick Start Ask the AI to walk you through the debugging triage checklist for your failing test or broken build, step by step.

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 and verifying the full suite passes.

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 plus 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. Add timestamps or artificial delays for race conditions, compare environments and data, check for leaked shared state, or add defensive logging and alerting until it recurs.

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 repeatedly until you reach the actual cause ensures the fix holds and the regression test guards the right behavior.

When should I remove debug logging after fixing a bug?

Remove instrumentation once the bug is fixed and a regression test guards against recurrence, especially logs useful only during development or containing sensitive data. Keep permanent instrumentation like error boundaries, API error logging, and performance metrics.