debugging-and-error-recovery

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

1|Updated May 25, 2020
One-click install
npx skills add https://github.com/titaneric/dotfiles --skill debugging-and-error-recovery-titaneric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/titaneric/dotfiles/tree/main/dot_agents/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/titaneric/dotfiles --skill debugging-and-error-recovery-titaneric

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: Structured triage flows for test failures, build failures, runtime errors, and non-reproducible bugs (timing, environment, or state dependent). - Safe Fallback and Instrumentation Patterns: Guidance on graceful degradation, safe defaults, and when to add or remove diagnostic logging. - Use Case: A test suite fails after a refactor. Instead of guessing, you follow the checklist: reproduce the failure in isolation, use git bisect to find the offending commit, fix the root cause, and add a regression test that fails without the fix. ## Quick Start Use the debugging-and-error-recovery skill to triage this failing test and find its root cause before fixing it.

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 failing 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?

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 testing, environment-dependent bugs need version and config comparison, and state-dependent bugs need isolation from shared state. If truly random, add defensive logging and monitoring.

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. Ask why the failure happens repeatedly until you reach the actual cause, such as fixing a faulty query rather than deduplicating in the UI.

Should I skip a flaky test to keep working on features?

No. Flaky tests often mask real bugs, and skipping them lets errors compound into later work. Investigate timing issues, order dependence, or external dependencies, and fix the flakiness or understand its cause before continuing.