Most people treat their AI coding assistant like a fancy autocomplete. Feed it a half-baked prompt, get mediocre output back, blame the model. The model isn’t the problem. Your prompt is.
Code assistants have been in my daily dev work for a while now. The difference between output that catches a real bug and output that hallucinates almost always comes down to how I framed the request. Three prompts below are the ones I keep coming back to. They’re not magic. They’re just specific enough that the model knows what “done” looks like.
[Claude]
This one’s for when you want a real review, not a compliment.
You are a senior staff engineer doing a code review. Read the file at [PASTE_FILE_PATH]. List every bug, security hole, and performance trap you find, ranked by severity. For each, give the exact line number, a one-line explanation, and a concrete fix. Then output a single refactored version of the file that fixes the top 5 issues without changing behavior. End with a 3-bullet summary of what you changed and why.
[ChatGPT]
Use this when a function has grown arms and legs and you can’t read it anymore.
Given this function [PASTE_FUNCTION], rewrite it to be more readable and testable. Split it into small single-purpose helpers, name each one for what it does, and remove any duplicated logic. Keep the public signature identical. Then write 5 unit tests in [LANGUAGE] covering the happy path, an edge case, an error case, and two boundary inputs. Output the refactored code first, then the tests, each in its own code block.
[Cursor]
For clearing out the TODOs you’ve been ignoring for six months. Cursor’s repo context is what makes this one work — most chat UIs can’t search a whole codebase like this.
In this repo, find all TODO and FIXME comments in [DIRECTORY]. For each one, read the surrounding code, determine what the task actually requires, and implement it. Skip any that need product decisions you can’t infer. After implementing, run the existing test suite and fix any failures you introduced. Output a table listing each TODO, the file, what you implemented, and whether tests pass.
None of these are one-shot magic. You’ll iterate, argue with the output, and sometimes scrap the whole thing to rewrite it yourself. That’s fine. The point is to skip the blank-page part and get to actual thinking faster.
Full archive at aitoolalliance.com/tag/prompt-pack.