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.
Agent prompt for Claude Code and Cursor
Prompt
mkdir -p .agents/skills/generate-reproducible-bug-fix-specs-for-coding-agents && curl -sL "https://prompts-gpt.com/prompts/generate-reproducible-bug-fix-specs-for-coding-agents/raw" -o .agents/skills/generate-reproducible-bug-fix-specs-for-coding-agents/SKILL.md---
name: generate-reproducible-bug-fix-specs-for-coding-agents
description: "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."
---
# 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.
## Prompt
```
Act as a Senior Software Engineer. I will provide a bug description. Your job is to create a reproduction script and a fix brief for an AI coding agent. Follow these rules: 1. Write a standalone bash script that reproduces the bug using only local file operations or standard library assertions. 2. Define the exact error message or state change that confirms the bug is fixed. 3. List only the specific files the agent is permitted to modify; explicitly forbid touching any other files. 4. Do not include conversational filler; provide only the script and the plan. Output format: # Reproduction Script: [Code block] # Expected Assertion: [One sentence] # Fix Brief: 1. Goal 2. Files to modify 3. Verification steps. This tool does not replace manual code review; always verify changes in a sandbox environment before merging.
```
## Usage Notes
Use this prompt when you have a specific bug report or stack trace. Paste the bug details immediately after the prompt. This works effectively in Claude Code, Cursor, and GitHub Copilot to prevent agents from wandering into unrelated parts of your codebase.
Act as a Senior Software Engineer. I will provide a bug description. Your job is to create a reproduction script and a fix brief for an AI coding agent. Follow these rules: 1. Write a standalone bash script that reproduces the bug using only local file operations or standard library assertions. 2. Define the exact error message or state change that confirms the bug is fixed. 3. List only the specific files the agent is permitted to modify; explicitly forbid touching any other files. 4. Do not include conversational filler; provide only the script and the plan. Output format: # Reproduction Script: [Code block] # Expected Assertion: [One sentence] # Fix Brief: 1. Goal 2. Files to modify 3. Verification steps. This tool does not replace manual code review; always verify changes in a sandbox environment before merging.Example output
Tips and common edits
Why this works
- Forces the agent to create an objective, binary pass-fail test case.
- Explicitly restricts file scope to prevent accidental collateral damage.
- Separates the verification logic from the implementation plan for clarity.
Use this prompt when you have a specific bug report or stack trace. Paste the bug details immediately after the prompt. This works effectively in Claude Code, Cursor, and GitHub Copilot to prevent agents from wandering into unrelated parts of your codebase.
Common edits
- Add a constraint to use a specific testing framework like Pytest or Jest.
- Include a requirement to add a permanent regression test to the repository.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Create Automated Verification Loops for Long-Running Coding Agents
Generate a deterministic shell pipeline that combines linting, isolated unit testing, and diff-budget monitoring to validate AI agent code changes.
Design a Sandbox Security Policy for Autonomous Coding Agents
Generate a rigorous security policy for autonomous agents to define allowed shell commands, file access boundaries, and network restrictions.
Root-Cause Bug Fix With a Failing Test and a Minimal Patch
Get a reproduced bug, a regression test that fails before the fix and passes after it, the smallest patch and a log of the commands Claude Code actually ran.
Claude Code Repo Recon and Implementation Plan for a New Feature
Has Claude Code inspect a repository read-only and produce an evidence-based implementation plan with file-level changes, tests, risks, and open questions. Use it to decide whether to start, split, or clarify a feature before any code is written.
Systematic Debugging: Agent Skill (SKILL.md) for Claude Code, Codex and Cursor
Hunts down bugs whose cause isn't obvious: flaky or intermittent failures, 'works locally but fails in CI', regressions nobody can place, or a fix that didn't stick.
Convert User Stories into Strict Acceptance Test Assertions
This prompt transforms vague business requirements into precise Given-When-Then test assertions with exact HTTP status codes and JSON payload structures for AI coding agents.
- Generate Database Migration and Rollback Specs for Coding Agents
- Create a Legacy Module Reference Sheet for Coding Agents
- Create a Verification Loop Script for AI Coding Agents
- Evaluate Coding Agent Test Suites for False Positive Traps
- Review AI Pull Requests for Phantom Imports and Bloat
- Structure a Multi-Repo Dependency Update Brief for Coding Agents