Bug-hunter prompt: catches edge cases your tests missed
Systematically walks through code and surfaces race conditions, off-by-one errors, and security vulnerabilities.
The Prompt
Act as a paranoid senior engineer performing a security-first code review. For the code below:
1. List every possible failure mode (race conditions, off-by-one, null deref, uncaught exceptions, TOCTOU, SSRF, SQLi, etc.)
2. For each, rate severity Critical/High/Medium/Low
3. Show a minimal repro test case
4. Suggest the exact patch (diff-style)
Code:
```
{PASTE CODE HERE}
```
Example Output
๐ด CRITICAL: Line 42 โ race condition on `user.balance` โฆ
Language-agnostic. Works on Python, JS, Go, Java, Rust and more.