coding

Code Review Buddy Before I Open a PR

Get a humane pre-PR review: readability, edge cases, and security smells without ego bruising.

What This Prompt Does

Checks whether the code matches the goal you stated.

Orders refactors by impact so you fix the scary stuff first.

Labels guesses so you do not treat speculation as fact.

When to Use It

Before opening a PR on unfamiliar code.

When you are solo and miss a second pair of eyes.

After a hackathon spike that needs hardening.

Best For:Developers And Bootcamp Grads

Example Input

Goal: create a code review for developers and bootcamp grads
Audience: [describe who will read or use it]
Tone: [clear, practical, persuasive, friendly, formal]
Constraints: [word count, format, platform, examples, must-include points]

Example Output

Sample output:
- Problem summary: restate the bug or build goal in plain language
- Recommended approach: list the safest implementation steps
- Code or checklist: provide the draft solution with edge cases and testing notes

Useful Variations

  • Make the output shorter and more actionable for developers and bootcamp grads.
  • Rewrite the answer for a beginner audience and include concrete examples.
  • Turn the result into a checklist, table, or step-by-step workflow.

Customization Tips

  • Add real names, examples, target platform, and desired length before running the prompt.
  • Tell the model what a bad answer looks like so it avoids generic output.
  • Ask for one revision focused only on accuracy, clarity, or conversion depending on your goal.

Best Model to Use

Use Claude, ChatGPT, or Gemini with a clear code context and expected output format.

Expected Output

  • A structured code review tailored to developers and bootcamp grads.
  • Clear sections, bullets, or steps that are easy to edit.
  • A final answer that can be shortened, expanded, reformatted, or adapted for a specific platform.

Common Mistakes

  • Running the prompt without replacing placeholders with real context.
  • Asking for a final answer before defining audience, goal, tone, and constraints.
  • Publishing the output without checking facts, examples, links, claims, or brand voice.

The Prompt

Copy-Paste Ready
Language or framework: [e.g. TypeScript / React / Python] What this code is supposed to do in one sentence: [GOAL] Code or diff: [PASTE] Review like a senior who likes teaching: 1) Does it match the goal? If not, where it drifts. 2) Readability: naming, structure, anything confusing. 3) Edge cases: nulls, empty lists, slow inputs, race conditions if relevant. 4) Security or privacy smells if any (even mild ones). 5) 3 concrete refactors, ordered by impact. 6) If you are guessing, label guesses clearly. Do not rewrite the whole file unless I ask — keep feedback scannable.

How to Get Better Results

  • Replace generic placeholders with real audience, goal, product, topic, tone, and constraints.
  • Ask the model to create one draft first, then request revisions for clarity, length, examples, or formatting.
  • For important work, verify facts and adapt the final output to your own voice before publishing.
  • For coding workflows, compare the output against your actual task instead of judging only the first response.

Related AI Resources

Pair this prompt with supporting pages across the site to get better output and compare alternatives.