← All posts

8 Free AI Prompts for Engineers

These are eight of the prompts I actually reach for while shipping software with AI. Steal them. Each is written to give you a useful answer on the first try — replace the bracketed parts and go.

1. Pre-PR self-review

You are a senior engineer reviewing my diff before I open a PR. Here is the diff:

[PASTE DIFF]

List, in priority order: (1) bugs or edge cases I likely missed, (2) anything that will confuse a reviewer, (3) tests I should add. Be specific and cite the exact lines. Don't praise; only flag what needs attention.

2. Debug a stack trace

Here is a stack trace and the relevant code. Stack trace:

[PASTE]

Code:

[PASTE]

Give me the 3 most likely root causes ranked by probability, the single fastest check to confirm each, and the minimal fix for the most likely one. Assume I know the codebase; skip the basics.

3. Plan a refactor safely

I want to refactor [DESCRIBE]. Before any code, produce: (1) the smallest first step that's independently shippable, (2) the exact order of steps so the system stays green at every commit, (3) what could break and how I'd catch it. Then wait for me to approve the plan.

4. Break down a fuzzy task for estimation

Here's a ticket: [PASTE]. Decompose it into concrete subtasks of <1 day each. For each, note the main unknown and how to resolve it cheaply. Flag the 1-2 subtasks most likely to blow up the estimate, and why.

5. Draft an ADR

Help me write an Architecture Decision Record for: [DECISION]. Context: [CONSTRAINTS]. Output the standard ADR sections (Context, Decision, Alternatives considered, Consequences). For alternatives, give the honest trade-off that made me reject each — not strawmen.

6. Generate the test cases I'd forget

Here is a function and its intended behavior:

[PASTE]

List the test cases worth writing, grouped as: happy path, boundaries, error handling, and concurrency/ordering if relevant. For each, one line on what it protects against. Then write the table-driven tests in [LANGUAGE/FRAMEWORK].

7. Rubber-duck a design before you build

I'm about to build [DESIGN]. Act as a skeptical staff engineer. Ask me the 5 questions that would most likely expose a flaw in this design, one at a time, waiting for my answer before the next. Don't propose solutions until you've heard my answers.

8. Review someone else's PR fast

Here's a PR diff I need to review:

[PASTE]

Summarize what it does in 3 bullets, then give me only the comments worth leaving: correctness risks, missing tests, and anything that increases long-term maintenance cost. Skip style nits a linter would catch.

Get the next one in your inbox

Practical AI workflows for engineers. One issue a week, no fluff.