Prompt Library / Coding / Unit Test Writer
This is a free, ready-made prompt for chatgpt & claude that tests that cover the edge cases you would forget, not just the happy path. Copy it, replace the bracketed parts, and paste it into your AI — no login and no cost.
Same prompt, structured with the XML tags Claude follows most reliably.
Replace the bracketed placeholders — [PASTE THE FUNCTION OR CODE], [LANGUAGE AND TEST FRAMEWORK] — with your own details, then paste the whole prompt as your first message. The bracketed parts are the only editing needed; the instructions around them are what make the answer come back structured instead of vague. If the first result is close but not right, ask the AI to adjust one thing at a time rather than rewriting the prompt.
Open the prompt gateway and type your goal in one line — it builds a fresh prompt around your exact wording, formatted for whichever model you run, with your choice of tone and output format.


Mpromp2 — the AI Prompt Generator. Every prompt in this library is free to use, including commercially.