Draft Reproducible Bug Reports from Error Stack Traces
Turn messy error logs and stack traces into structured, actionable bug reports with minimal reproduction scripts.
Agent prompt for ChatGPT and Claude
Prompt
mkdir -p .agents/skills/draft-reproducible-bug-reports-from-error-stack-traces && curl -sL "https://prompts-gpt.com/prompts/draft-reproducible-bug-reports-from-error-stack-traces/raw" -o .agents/skills/draft-reproducible-bug-reports-from-error-stack-traces/SKILL.md---
name: draft-reproducible-bug-reports-from-error-stack-traces
description: "Turn messy error logs and stack traces into structured, actionable bug reports with minimal reproduction scripts."
---
# Draft Reproducible Bug Reports from Error Stack Traces
Turn messy error logs and stack traces into structured, actionable bug reports with minimal reproduction scripts.
## Prompt
```
Act as a Senior Software Engineer. Your job is to analyze raw error logs and stack traces to create a professional, reproducible bug report. Before starting, ask me these 3 questions: 1. Paste the full stack trace or error log. 2. What framework or language version are you using? 3. What were the specific user actions or inputs leading to this error? Wait for my answers. Once I provide them, generate the response using these rules: First, identify the exact failing function call chain. Second, write a minimal, self-contained reproduction script in the original language. Third, create an Expected vs Actual Behavior table. Fourth, list 3 potential root causes based on the trace. Output format: # Bug Report: [Short Title] ## Failing Call Chain: [List the chain] ## Minimal Reproduction Script: [Code block] ## Behavior Comparison: [Table with columns: Scenario, Expected, Actual] ## Root Cause Analysis: [Numbered list] This is not professional software engineering advice; consult your team lead for critical production system changes.
```
## Usage Notes
Use this with ChatGPT, Claude, or GitHub Copilot Chat when you are stuck debugging a cryptic error. Paste your logs directly into the chat after answering the initial questions to get a clear path to reproduction.
Act as a Senior Software Engineer. Your job is to analyze raw error logs and stack traces to create a professional, reproducible bug report. Before starting, ask me these 3 questions: 1. Paste the full stack trace or error log. 2. What framework or language version are you using? 3. What were the specific user actions or inputs leading to this error? Wait for my answers. Once I provide them, generate the response using these rules: First, identify the exact failing function call chain. Second, write a minimal, self-contained reproduction script in the original language. Third, create an Expected vs Actual Behavior table. Fourth, list 3 potential root causes based on the trace. Output format: # Bug Report: [Short Title] ## Failing Call Chain: [List the chain] ## Minimal Reproduction Script: [Code block] ## Behavior Comparison: [Table with columns: Scenario, Expected, Actual] ## Root Cause Analysis: [Numbered list] This is not professional software engineering advice; consult your team lead for critical production system changes.Example output
Tips and common edits
Why this works
- Forces a structured breakdown of the failing call chain for clarity.
- Ensures you have a minimal reproduction script to verify the fix.
- Uses a clear table to contrast expected behavior against the actual error.
Use this with ChatGPT, Claude, or GitHub Copilot Chat when you are stuck debugging a cryptic error. Paste your logs directly into the chat after answering the initial questions to get a clear path to reproduction.
Common edits
- Add specific environment variables or hardware constraints if they are relevant to your bug.
- Include additional sections for security implications if the error exposes sensitive data.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Automated Database Migration Safety Review for Claude Code
You get a structured risk assessment of your SQL migration scripts to prevent production downtime, data loss, and long-running table locks.
Create Error Handling Contracts for AI Agents
This prompt transforms raw stack traces into structured error envelopes that provide agents with specific remediation steps and valid parameter constraints for self-correction.
Generate Reproducible Bug Fix Specs for Coding Agents
Get a standalone reproduction test script and a precise technical plan to fix a bug, ensuring your AI agent stays focused and avoids unnecessary file changes.
Turn Sentry Errors into Reproducible Codex Test Cases
Transforms a production Sentry stack trace and context payload into a self-contained failing unit test designed for Codex repo tasks.
Paste a Bug Report, Get a Test-First Fix in Any AI Chat
Get a failing test that reproduces your pasted bug, the root cause, the smallest fix as a diff and its risks, in any chat assistant with no repository access needed.
Root Cause Analysis from Stack Trace and Logs
Turns an error report, stack trace, and logs into ranked root-cause hypotheses. Includes the cheapest checks to confirm each one, a fix proposal, and a regression test plan.