Skill · Workflow

bug-triage-and-fix-plan

Reproduces a reported bug, finds the cause in the repo, proposes a fix plan and waits for approval before editing code. Use when asked to run the "Bug triage and fix plan" workflow.

The skill itself. Agents read the name and description first and load the rest only when a task matches.

bug-triage-and-fix-plan/SKILL.md
---
name: bug-triage-and-fix-plan
description: Reproduces a reported bug, finds the cause in the repo, proposes a fix plan and waits for approval before editing code. Use when asked to run the "Bug triage and fix plan" workflow.
---

# Bug triage and fix plan

Reproduces a reported bug, finds the cause in the repo, proposes a fix plan and waits for approval before editing code.

## Inputs

Ask for any of these that the user hasn't given:

- `issue` (e.g. "Saving a prompt with an emoji in the title returns 500")
- `code_context` (e.g. "Paste the stack trace and the function(s) involved (e.g. slugify in src/lib/prompts/utils.ts)")

## Steps

Run the steps in order. Refer to saved results by name. Don't skip a step that says STOP.

1. **Issue labelled bug** — Start: Runs when an issue gets the bug label, or by hand with {{issue}}.
2. **Reproduce** — Using {{code_context}}, write the smallest failing test or command that shows {{issue}}. Don't change app code yet. If the context isn't enough, list exactly what's missing. Save the result as `repro`.
3. **Find the cause** — Trace {{repro}} to the line that fails. Explain why in two sentences. Save the result as `cause`.
4. **Approve the fix plan** — STOP and ask the user to approve before continuing: Show the plan: files to change, the test, the risk. Wait for go-ahead.
5. **Fix and verify** — Apply the plan, run the test suite, and report what changed. Save the result as `result`.
6. **Open a PR** — Finish: Open a PR that links the issue and includes {{repro}} and {{cause}}.

## Done when

Every step has run, each approval was given, and you've reported what was produced and where it was saved.