Bug triage and fix plan: Multi-Step Agent Workflow for Claude Code, Codex or ChatGPT

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

The prompt

Installs to .agents/skills/bug-triage-and-fix-plan-multi-step-agent-workflow-for-claude-cod/

mkdir -p .agents/skills/bug-triage-and-fix-plan-multi-step-agent-workflow-for-claude-cod && curl -sL "https://prompts-gpt.com/prompts/bug-triage-and-fix-plan-multi-step-agent-workflow-for-claude-code-codex-or-chatgpt/raw" -o .agents/skills/bug-triage-and-fix-plan-multi-step-agent-workflow-for-claude-cod/SKILL.md
SKILL.md
Preview
---
name: bug-triage-and-fix-plan-multi-step-agent-workflow-for-claude-cod
description: "Reproduces a reported bug, finds the cause in the repo, proposes a fix plan and waits for approval before editing code."
---

# Bug triage and fix plan: Multi-Step Agent Workflow for Claude Code, Codex or ChatGPT

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

## Prompt

```
---
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.
```

## Usage Notes

Run it in Claude Code or Codex: save as .claude/skills/bug-triage-and-fix-plan/SKILL.md (or .agents/skills/ for Codex) and say "run the Bug triage and fix plan workflow"; parallel steps run as subagents. Or paste it into ChatGPT or Claude and answer its questions. It asks for: issue, code_context. Build or run it step by step at prompts-gpt.com/workflows/bug-triage-and-fix-plan.

Run it in Claude Code or Codex: save as .claude/skills/bug-triage-and-fix-plan/SKILL.md (or .agents/skills/ for Codex) and say "run the Bug triage and fix plan workflow"; parallel steps run as subagents. Or paste it into ChatGPT or Claude and answer its questions. It asks for: issue, code_context. Build or run it step by step at prompts-gpt.com/workflows/bug-triage-and-fix-plan.

Make it repeatable

Keep using this prompt without pasting it in every time.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in AI Coding Agents