Home / Prompts / Test-First Bug Fixing Approach

Test-First Bug Fixing Approach

Text promptCodingPublic domain (CC0)
41score

Fill in

The prompt below updates as you type.

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.

Context cost: ≈146 tokens when used.

Why this score

Quality checklist20/40
Community votes11/30
Editor pick0/15
Fill-in fields10/10
Discussion0/5

Quality checklist

  • Sets a role: no
  • States a clear task: yes
  • Gives context: no
  • Sets constraints: yes
  • Defines the output: no
  • Breaks work into steps: yes

The checklist is automatic and applies the same rules to every prompt. It checks structure, not whether the output is good. Prompt scores aren't comparable with tool scores. How we rank

Security

Scanned Nov 4, 2026 at the text shown on this page, with Cisco's open-source skill-scanner.

None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.

A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan

Similar prompts

Prompts that do the same job, most voted first.

NameVotesScore
This oneTest-First Bug Fixing Approach Coding ▲ 241
Comprehensive Repository Analysis and Bug Fixing Framework Coding Same job: debugging ▲ 2189
Comprehensive Framework for Auditing, Detecting, and Remediating Bugs and Vulnerabilities in Multi-Stack Repositories Coding Same job: debugging ▲ 567
Autonomous Root-Cause Debugging & Bug-Fix Architect Coding Same job: debugging ▲ 052
Django Unit Test Generator for Viewsets Coding Same job: testing & qa ▲ 149
Web Application Testing Skill Agents & automation Same job: testing & qa ▲ 463