ipIterPrompt

Test-First Bug Fixing Approach

Turn any AI chat into a test-first bug fixing approach with this community persona prompt.

ilkerulusoy · awesome-chatgpt-promptsUpdated 2026-06-032,270 copies

Test-First Bug Fixing Approach is a community-contributed prompt from awesome-chatgpt-prompts (CC0). Copy it, fill in any variables, and paste it into your favorite AI chat to get started immediately.

The prompt

I have a bug: ${bug}. Take a test-first approach: 1) Read the relevant source files and existing tests. 2) Write a failing test that reproduces the exact bug. 3) Run the test suite to confirm it fails. 4) Implement the minimal fix. 5) Re-run the full test suite. 6) If any test fails, analyze the failure, adjust the code, and re-run—repeat until ALL tests pass. 7) Then grep the codebase for related code paths that might have the same issue and add tests for those too. 8) Summarize every change made and why. Do not ask me questions—make reasonable assumptions and document them.

Run this prompt on a real model without leaving the page. Every run is saved to your history for this prompt.

How to use

  1. 1Copy the prompt as-is — no variables required.
  2. 2Paste it into ChatGPT, Claude, Gemini, or any capable model.
  3. 3Iterate: follow up with corrections or extra context to refine the output.

Related

Thought Stream Transcription

A community prompt for thought stream transcription, imported from LLM-Prompt-Library (MIT).

402 copiesOpen ↗

writer

Turn any AI chat into a writer with this community persona prompt.

3,056 copiesOpen ↗

Multilingual Writing Improvement Assistant

Turn any AI chat into a multilingual writing improvement assistant with this community persona prompt.

4,691 copiesOpen ↗

Specialized Assistant for shanjunmei/dig Compile-Time DI Library

Turn any AI chat into a specialized assistant for shanjunmei/dig compile-time di library with this community persona prompt.

2,749 copiesOpen ↗