debugging-and-error-recovery

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

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Kunj-Sharma03/agent-contextify --skill debugging-and-error-recovery-kunj-sharma03
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-and-error-recovery
Source: https://github.com/Kunj-Sharma03/agent-contextify/tree/main/templates/skills/debugging-and-error-recovery
Command: npx skills add https://github.com/Kunj-Sharma03/agent-contextify --skill debugging-and-error-recovery-kunj-sharma03

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). - Bisection and Instrumentation Guidance: Use git bisect to find regressions and apply temporary logging with clear rules for when to add and remove it. - Use Case: A test suite fails after a refactor. Instead of guessing, you follow the checklist to reproduce the failure in isolation, bisect to the offending commit, fix the shared-state leak causing it, and add a regression test before resuming work. ## Quick Start Ask the agent to systematically debug the failing test or broken build using the root-cause triage checklist 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?

Reproduce the failure reliably first, then localize which layer is failing, reduce to a minimal 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: mark the current commit as bad, mark a known-good commit, and 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 cannot be reproduced?

Classify it as timing, environment, or state dependent. Add timestamps or artificial delays for race conditions, compare environments and data for environment issues, check for leaked shared state, and add defensive logging with alerts for truly random failures.

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 you reach the actual cause produces a durable fix that a regression test can guard.

When should I remove debug logging after fixing a bug?

Remove temporary instrumentation once the bug is fixed and a regression test guards against recurrence, especially if logs contain sensitive data. Keep permanent instrumentation like error boundaries, API error logging, and performance metrics at key flows.