Most engineers I know type the same kind of ChatGPT prompt twenty times a week and get twenty slightly-different-quality answers. The fix isn't a better model, it's treating prompts like code you reuse instead of throwaway scripts.
Here's the small system that made my AI usage actually consistent.
1. Give it a role and a constraint, not just a question
Bad:
explain this regex
Better:
You are a senior engineer reviewing a teammate's PR. Explain this regex line by line, then point out one edge case it will miss. Be concise.
^(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+)@`
The role sets the tone, the constraint ("one edge case", "be concise") stops it from rambling.
2. Keep a tiny library of skeletons
I keep ~15 prompt skeletons in a snippets file. Examples:
- Refactor: "Refactor for readability without changing behavior. List the changes as a bulleted diff summary first, then the code."
- Debug: "Here is the error and the relevant code. Give the 3 most likely causes ranked by probability, with a one-line check for each before you suggest a fix."
- Explain a codebase file: "Summarize what this file is responsible for in 3 bullets, then list its external dependencies and what calls it."
- Write tests: "Write tests covering the happy path, one boundary case, and one failure case. Name each test after the behavior it verifies."
The value isn't any single prompt, it's never starting from a blank box.
3. Ask for the reasoning order you want
LLMs commit to an answer early and rationalize backward. If you want it to think before concluding, say so: "List the tradeoffs first, then make a recommendation." You'll catch more of its bad assumptions.
4. Make it cite the input
For anything factual about your own code or docs, add: "Quote the exact lines you based each claim on. If it's not in the text I gave you, say you don't know." This kills a surprising amount of hallucination.
5. Save the ones that work
When a prompt produces a genuinely good result, paste it into your snippets file with a one-line note on why. Over a few weeks you build a personal toolkit that beats whatever you'd improvise.
That's the whole system: roles, skeletons, explicit reasoning order, citation, and saving the winners. It costs nothing and it's the difference between AI being a slot machine and AI being a reliable tool.
If you'd rather not build the library from scratch, I packaged 200+ categorized, ready-to-paste prompts (refactoring, debugging, docs, client comms, planning) here: https://orgdoc.gumroad.com/l/fbayam — but honestly, even just keeping your own snippets file will get you 80% of the way.
Top comments (0)