Home / Prompts / Test-First Bug Fixing Approach
Test-First Bug Fixing Approach
Text promptCodingPublic domain (CC0)
41score
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 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.
| Name | Votes | Score |
|---|---|---|
| This oneTest-First Bug Fixing Approach Coding | ▲ 2 | 41 |
| Comprehensive Repository Analysis and Bug Fixing Framework Coding Same job: debugging | ▲ 21 | 89 |
| Comprehensive Framework for Auditing, Detecting, and Remediating Bugs and Vulnerabilities in Multi-Stack Repositories Coding Same job: debugging | ▲ 5 | 67 |
| Autonomous Root-Cause Debugging & Bug-Fix Architect Coding Same job: debugging | ▲ 0 | 52 |
| Django Unit Test Generator for Viewsets Coding Same job: testing & qa | ▲ 1 | 49 |
| Web Application Testing Skill Agents & automation Same job: testing & qa | ▲ 4 | 63 |