# Debug Failures at the Root Cause

Unstructured debugging causes repeated failures, wasted time, and fragile fixes. This skill provides a repeatable process for finding causes, validating fixes, and preventing regressions.

## Install

```bash
npx skillstore add addyosmani/debugging-and-error-recovery
```

## Metadata

- Status: approved
- Slug: addyosmani-debugging-and-error-recovery
- Skillstore revision: r1
- Version status: missing
- Tree hash: 9bf24bcc8006552dd96983e91fa008eb4d375463887554f13d4cad12ad125769
- Author: addyosmani
- GitHub username: addyosmani
- License: MIT
- Repository: https://github.com/addyosmani/agent-skills/tree/be4e44a9fbc5e8df0beaefadbb28bd22ee61cc39/skills/debugging-and-error-recovery
- Ref: 5526951beaeca22519572a471618555839b53b05
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, env\_access
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/addyosmani-debugging-and-error-recovery
- Manifest: https://skillstore.pages.dev/api/skills/addyosmani-debugging-and-error-recovery/manifest

## Capabilities

- Provides a six-step workflow for reproducing, localizing, reducing, fixing, guarding, and verifying failures.
- Suggests focused commands for tests, builds, bisecting, and development checks.
- Explains triage patterns for test, build, runtime, network, and configuration failures.
- Promotes minimal reproductions and regression tests that capture specific bugs.
- Recommends safe fallback and graceful degradation patterns for error handling.
- Identifies when diagnostic instrumentation should be added or removed.

## Use Cases

- Triage a failing test: Reproduce the failure, isolate the smallest case, identify the cause, and add a regression test.
- Investigate a broken build: Classify the build error, inspect the cited layer, verify dependencies, and confirm the complete build afterward.
- Stabilize a production bug: Preserve evidence, localize runtime behavior, apply a durable fix, and verify the original scenario end to end.

## Prompt Templates

### Start a Basic Triage

```
Use the debugging workflow for this issue: [describe the failure]. Ask for missing reproduction steps and evidence, then identify the next diagnostic action.
```

### Analyze a Test Failure

```
Triage this failing test using reproduce, localize, reduce, fix, guard, and verify. Test: [name]. Error: [output]. Recent change: [change].
```

### Find a Regression Commit

```
Isolate the regression in [repository or component]. Compare known-good and failing states, create a minimal reproduction, and define focused verification commands.
```

### Lead an Incident Investigation

```
Lead this incident: [symptoms, timeline, logs, and impact]. Separate facts from hypotheses, identify needed evidence, propose a reversible fix, and define safeguards.
```

## Limitations

- It does not run tests, inspect repositories, or change files by itself.
- Its command examples require adaptation to the repository's tools and scripts.
- It cannot determine the root cause without accurate logs, reproduction steps, and code context.
- It does not replace incident response, security review, or production change controls.

## Best Practices

- Reproduce the failure before changing code, and preserve logs, inputs, and conditions.
- Prefer the smallest failing case and fix the root cause instead of masking the symptom.
- Verify the original scenario, the full test suite, and relevant build checks after the fix.

## Anti Patterns

- Do not skip a failing test to continue feature work.
- Do not guess at a fix without confirming the failure and its evidence.
- Do not make unrelated changes while investigating a defect.

## Security Audit

- Audited at: 2026-09-12T11:54:29.831\+00:00
- Summary: All 32 static findings are false positives because they identify Markdown fences, example commands, a configuration lookup, or ordinary troubleshooting text rather than executable malware. No prompt injection, data-exfiltration intent, or malicious behavior was found in SKILL.md.

## Stats

- Views: 0
- Downloads: 0
- Favorites: 0
- Popularity score: 0
