# Diagnose Bugs and Plan Fixes

Software failures often have unclear causes and scattered evidence. This skill guides Claude, Codex, and Claude Code to produce structured diagnosis reports with practical repair steps.

## Install

```bash
npx skillstore add 727474430/bug-diagnose-and-root-cause-and-fix
```

## Metadata

- Status: approved
- Slug: 727474430-bug-diagnose-and-root-cause-and-fix
- Skillstore revision: r1
- Version status: missing
- Tree hash: aec3c8853a799d3728ae10b4bc4ff0ed0379c173eac1aaff7343d16686b9c8ab
- Author: 727474430
- GitHub username: 727474430
- License: MIT
- Repository: https://github.com/727474430/cli-rule-swtich/tree/main/templates/claude/jige/skills/bug-diagnose-and-root-cause-and-fix
- Ref: e9e4712298ed071d92417a41714be123eb8364fa
- 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
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/727474430-bug-diagnose-and-root-cause-and-fix
- Manifest: https://skillstore.pages.dev/api/skills/727474430-bug-diagnose-and-root-cause-and-fix/manifest

## Capabilities

- Collects error symptoms, reproduction steps, and missing context before analysis.
- Guides review of relevant files, functions, logs, and recent code changes.
- Builds evidence-based hypotheses and validates them against code behavior.
- Produces root cause explanations with file and line references.
- Creates step-by-step repair plans with validation commands and expected results.
- Compares multiple fix options when more than one solution is reasonable.

## Use Cases

- Triage Production Defects: Analyze symptoms, logs, and recent changes to identify the most likely cause of a service defect.
- Debug Frontend Failures: Trace broken UI behavior to component logic, state handling, routing, or integration errors.
- Prepare Repair Guidance: Create clear fix steps and validation checks before assigning implementation work.

## Prompt Templates

### Basic Bug Diagnosis

```
Use this skill to diagnose this bug. Review the error message, identify likely causes, and produce a root cause report with repair steps.
```

### Reproduction-Based Investigation

```
Use this skill to analyze these reproduction steps. Map each step to the relevant code path, explain where behavior diverges, and propose a fix plan.
```

### Regression Root Cause

```
Use this skill to investigate this regression. Check recent changes, identify the root cause, and compare at least two repair options with tradeoffs.
```

### Complex Cross-System Failure

```
Use this skill for a deep diagnosis. Build hypotheses, identify evidence needed for each one, cite relevant files and lines, and produce a prioritized remediation plan.
```

## Limitations

- Does not directly modify code or apply patches.
- Requires access to relevant source files, logs, or error messages.
- May need user follow-up when reproduction steps are incomplete.
- Command suggestions still need review before running in sensitive environments.

## Best Practices

- Provide exact error messages, stack traces, and reproduction steps before asking for diagnosis.
- Share relevant files or logs so conclusions can cite concrete evidence.
- Review suggested commands and fixes before using them in production systems.

## Anti Patterns

- Do not ask for a fix without providing the observed behavior and expected behavior.
- Do not treat the first hypothesis as final without checking supporting evidence.
- Do not run suggested verification commands blindly in sensitive environments.

## Security Audit

- Audited at: 2026-07-04T17:11:44.909\+00:00
- Summary: The static external command findings are false positives caused by Markdown inline code examples, not executable code. The obfuscation heuristic is also a false positive because the skill file is readable Markdown content with no encoded payload or prompt injection evidence.

## Stats

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