In the pack: ChatGPT, Claude & Gemini Prompts for Coding and Developers
Edge-Case Hunt: Inputs Most Likely to Break This Code
Prompt
Language: {{LANGUAGE}}
Code: {{CODE}}
Where its input comes from (user form, API, file upload, another service, database): {{INPUT_SOURCE}}
Hunt through these categories and list only the ones relevant to this code:
- Empty, null, missing fields, wrong types
- Zero, negative, very large numbers, NaN and infinity, floating-point rounding
- Very long strings, Unicode (emoji, combining characters, right-to-left text), leading and trailing whitespace, case differences
- Dates: time zones, daylight-saving transitions, leap days, end of month, epoch values
- Collections: duplicates, unsorted input, a single element, huge sizes
- Concurrency and repeated calls, partial failures of dependencies
- Malicious input: injection strings, path traversal, oversized payloads
For each edge case: the exact input, what you predict the code does by reading it (quote the line), and the correct behavior. Rank by likelihood × damage. Then write runnable tests for the top eight.
Predictions are hypotheses; label them "predicted" and let the tests decide.
Customize this prompt
Fill in the variables below to personalize this prompt:
Model Settings
Recommended Models
Temperature
Max Tokens
Additional Notes
About this prompt
“Edge-Case Hunt: Inputs Most Likely to Break This Code” is a free prompt for ChatGPT in the Coding & Software category, 181 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.
It has 3 placeholders to fill in first:
{{LANGUAGE}}, {{CODE}}, {{INPUT_SOURCE}}.
Use the “Customize this prompt” fields to personalise it before you copy.
Recommended models: ChatGPT, Claude, Gemini.
0 upvotes, sent to an AI tool 0 times, viewed 110 times.
Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.