Coding 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.
Running it here
1 step needs a connector (github). Run here, those steps are skipped or shown to copy, and the rest still runs. In your own agent with those tools connected, every step runs. Runs here start by hand; to start it from github, run it in your agent or automation tool.
- TriggerIssue labelled bugRuns when an issue gets the bug label, or by hand with {{issue}}.→ github · manual start here
- AgentReproduceUsing {{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.
- AgentFind the causeTrace {{repro}} to the line that fails. Explain why in two sentences.
- ApprovalApprove the fix planShow the plan: files to change, the test, the risk. Wait for go-ahead.→ chat
- AgentFix and verifyApply the plan, run the test suite, and report what changed.
- OutputOpen a PROpen a PR that links the issue and includes {{repro}} and {{cause}}.→ github · shown here to copy
Good for
Developers handed a bug report who want the cause found and a fix plan to approve before any code changes.
Last reviewed
Install as a skill
The whole workflow as one SKILL.md. Install it in Claude Code, Codex or Copilot and ask your agent to run “Bug triage and fix plan”.
Get the bug-triage-and-fix-plan skillWhat each step does
1. Issue labelled bug (Trigger)
Runs when an issue gets the bug label, or by hand with {{issue}}.
2. Reproduce (Agent)
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.
3. Find the cause (Agent)
Trace {{repro}} to the line that fails. Explain why in two sentences.
4. Approve the fix plan (Approval)
Show the plan: files to change, the test, the risk. Wait for go-ahead.
5. Fix and verify (Agent)
Apply the plan, run the test suite, and report what changed.
6. Open a PR (Output)
Open a PR that links the issue and includes {{repro}} and {{cause}}.
Use it in your own agent
Save as .claude/skills/bug-triage-and-fix-plan/SKILL.md for Claude Code, or .agents/skills/bug-triage-and-fix-plan/SKILL.md for Codex and other Agent Skills tools. Then ask: “run the Bug triage and fix plan workflow”.
---
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.
Want different steps? Open it in the workflow builder.