debugging-and-error-recovery

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

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill debugging-and-error-recovery-22teikk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/22Teikk/22Teikk-Agent-Skills-Hub/tree/main/core/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill debugging-and-error-recovery-22teikk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When tests fail, builds break, or runtime behavior diverges from expectations, developers often guess at fixes, patch symptoms, or push past errors — compounding bugs and wasting hours. This Skill enforces a disciplined, evidence-first debugging process that finds and fixes the actual root cause. ## Core Features & Use Cases - Structured Triage Checklist: A six-step ordered process — Reproduce, Localize, Reduce, Fix Root Cause, Guard, Verify — with explicit gates for Expected-vs-Actual, Why-Now, and Blast Radius analysis before any code change. - Error-Specific Decision Trees: Branching triage flows for test failures, build failures (type, import, config, dependency, environment), and runtime errors (NPEs, network errors, Compose crashes), plus strategies for non-reproducible and flaky bugs. - Regression Guarding & Safe Fallbacks: Guidance on writing regression tests that fail without the fix, safe fallback patterns in Kotlin (graceful degradation, safe defaults), and instrumentation rules for when to add or remove logging. - Use Case: A Gradle test suite fails after a refactor. Instead of guessing, you follow the checklist: reproduce the failure with ./gradlew test --tests, bisect with git bisect to find the offending commit, state the root cause and fix proposal, apply the minimal fix, and add a regression test before resuming feature work. ## Quick Start Use the debugging-and-error-recovery skill to triage this failing test and find its root cause before changing any code.

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 failing 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 with git bisect?▼

Run git bisect start, mark the current commit bad and a known-working commit 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 check before fixing a bug?▼

State the expected versus actual behavior in one sentence, identify why the bug appeared now (what changed), and assess the blast radius — what else depends on the suspected code. Only propose and apply a fix after this triage is complete.

How do I handle a bug I cannot reproduce?▼

Classify it as timing-dependent, environment-dependent, state-dependent, or truly random. Add timestamps or artificial delays for race conditions, compare environments and data states, run in isolation, or add defensive logging and monitoring until it recurs.

Should I fix a flaky test or ignore it?▼

Fix it — flaky tests mask real bugs. Investigate timing issues, order dependence, leaked shared state, and external dependencies. Never skip a failing test to continue feature work, since errors compound across subsequent changes.

When is it safe to apply a bug fix without approval?▼

Proceed directly only for low-risk, single-site fixes with a clearly identified root cause. Pause for approval when the blast radius is wide, the fix touches shared contracts, security or payment paths, or involves irreversible operations.