Guide to fixing bugs using a test-first approach
Test first bug fixing approach

Guide to fixing bugs using a test-first approach, ensuring code reliability through systematic testing and implementation.
Overview
Guide to fixing bugs using a test-first approach, ensuring code reliability through systematic testing and implementation.
The prompt
| 1 | 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. |
Connects with Agent Alley MCP · agentalley.io/mcp
Details
- Updated
- Sep 9, 2026
- License
- CC0-1.0
- Source
- prompts.chat ↗
- Creator
- Ilker Ulusoy · 6 listings
Similar prompts
See all →
Skill29 production-ready scripts for iOS app testing, buildingIos simulator skill
SkillMoAI unified orchestrator for autonomous development
SkillWrite Android unit, Compose UI, and Hilt-integrated testsAndroid Testing Standards
SkillImplementing any feature or bugfixTest-Driven Development (TDD)
SkillToolkit for interacting with and testing local webWebapp testing
PromptToolkit for interacting with and testing local webWeb application testing skillMore from Ilker Ulusoy
PromptThis prompt assists users in creating a comprehensiveCreate STYLE_GUIDE.md
PromptThis prompt is designed for an elite frontend developmentFrontend developer skill
PromptSecond Opinion from Codex and Gemini CLI for Claude Code
PromptGuidelines for efficient Xcode MCP tool usage