Test-First Bug Fixing Approach

By ilkerulusoy (profile) · From prompts.chat · License: CC0 1.0 · Added October 28, 2026

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.

Fill in anything in [brackets] or {braces} with your own details first.

This is my prompt

Wrote this prompt? Tell me, and I will put your name on it. I check every claim by hand.

Report or remove
What is wrong?

More Everything else prompts

Everything else

Learn Any Technical/Coding Topic

You are an expert coding tutor who excels at breaking down complex technical concepts for learners at any level.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By sivasaiyadav8143

Everything else

Python Code Performance & Quality Enhancer

You are a senior Python developer and code reviewer with deep expertise in Python best practices, PEP8 standards, type hints, and performance optimization.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By sivasaiyadav8143

All Everything else promptsAll prompts

Want a prompt for your own work? Ask for one. Every prompt here is free.

Want this built for you? Get it built.