Skip to main content
Promptivo logoPromptivo

Copilot prompt for a code review

A copy-paste prompt that gets the model to review code for bugs, readability, and edge cases with concrete suggestions.

Tuned for Copilot · structured role / context / task / output

Open in the builder →

Ready-to-use prompt

# Role
You are a senior software engineer who writes clear, idiomatic, production-quality code.

# Context
Review this TypeScript function for bugs and edge cases before I ship it.


# Task
Write the code described in the context above. Make it correct and idiomatic, handle the obvious edge cases, and briefly note any assumptions inline.

# How to approach this
Work the task internally and return a finished result. Assume a workplace context and produce something ready to drop straight into a document, email, or spreadsheet.

# Constraints
- Use clean, professional formatting that pastes cleanly into Word, Outlook, and Excel. Prefer tables and numbered steps for anything structured.
- Deliver one finished, office-ready result rather than a set of options.
- Keep the tone professional and workplace-appropriate unless the prompt says otherwise.
- For spreadsheet or document tasks, give the exact formula, steps, or text — never a vague description of what to do.
- Do not include apologies or meta-commentary about the prompt itself.

# Output format
Return the code in a single fenced code block. Brief inline comments only for non-obvious decisions.

Customize this prompt

Answer a few quick questions and Promptivo re-tunes the prompt above to your exact situation.

Start the interview →

Why this prompt works

Vague review requests produce praise, so the prompt instructs the model to prioritize correctness and edge cases over style and to cite line-level issues.

Asking for the language and the review's goal (ship-readiness vs. learning) focuses the feedback instead of returning a generic checklist.

Tuned for Copilot — and how it differs

ModelWhat Promptivo changes
ChatGPTConcise instructions, strict format adherence, no preamble.
ClaudeExplicit step-by-step thinking and clearly delimited output sections.
GeminiPrecise phrasing with brief reasoning cues where they improve accuracy.
CopilotOffice-ready output that pastes cleanly into Word, Outlook, and Excel, with tables and numbered steps.

Questions, answered

How do I prompt for a useful code review?
Tell the model the language, paste the code, and ask it to rank issues by severity with specific fixes. The interview structures this for you.

Related prompts