EN
My account

Your privacy, your call. No advertising cookies. May we count your visit in aggregate (Cloudflare, no cookies) and remember where you came from? If you reject, we won’t measure your visit. · Cookies · Privacy

Privacy settings

Choose what we measure and what we keep in this browser. We never sell or share your data.

Essential

Remember your theme, language, saved items and this choice. Without them the site cannot work the way you ask.

Always on

Keeps the source of your first and latest visit for 90 days (utm parameters and referring site). It only leaves your browser if you subscribe to the newsletter.

Cloudflare Web Analytics counts visits in aggregate: page, referring site, country, browser and load times. No cookies, no identifiers and no profiling; nothing is stored in your browser. It only loads if you accept it. If you reject it or switch it off, it does not load (or stops loading from the next page) and we do not count your Telegram clicks either.

Cookies · Privacy

Work · Professional prompt

Senior-level code review

Professional structure: role, context, objective, details, steps, format, criteria and self-check. Designed for better results, not guaranteed ones: always review the answer.

Never use real personal data. If you need to, run it through the data cleaner.

Fill in the blanks
## Role
Act as a senior software engineer who gives demanding but kind code reviews.

## Context
I want my code reviewed before merging it.

## Objective
Find bugs, security risks, performance and readability problems, with concrete proposals.

## Details (fill in what is in square brackets)
- [code or diff, without keys or secrets]
- [language and version]
- [what the code should do]
- [project conventions]

## Step-by-step instructions
1. Summarise what the code does to confirm you understand it.
2. Look for logic errors and edge cases.
3. Check security: inputs, injections, secrets and permissions.
4. Suggest readability and performance improvements with corrected code.

## Output format
List of findings with severity (critical, major, minor), line, explanation and proposal; then the corrected snippet.

## Quality criteria
- It does not invent non-existent APIs or functions.
- Every finding has a specific reason.
- It separates bugs from style preferences.

## Self-check
Before answering, check every quality criterion. If information is missing, ask me instead of making it up, and at the end state what you have assumed.

The link opens the empty template: what you type is not included.

Objective

Find bugs, security risks, performance and readability problems, with concrete proposals.

When to use it

This prompt is brilliant when you are working solo or in a small team and need a second pair of eyes before merging a pull request. It excels at catching logic slips and security oversights that tired eyes often miss. However, it is not a replacement for a proper QA cycle or unit tests. Avoid using it for extremely large, multi-file architectural refactors where the context window might get crowded, leading to weaker analysis and less reliable suggestions.

Worked example: input (fictional data)

Code/Diff: const fs = require('fs'); function saveUser(data) { const file = 'users.txt'; fs.appendFileSync(file, data.name + ':' + data.pass + '\n'); } Language/Version: Node.js v18.16 What code should do: This function appends a new username and password to a simple text file for our internal staff directory application. Project Conventions: We use strict mode, async file operations only, and all data must be sanitised before persistence. We are currently migrating away from synchronous file system methods due to performance concerns.

Worked example: full response

Summary: The code is a Node.js function designed to append user credentials (name and password) to a text file for an internal staff directory. Findings: - Critical: Storing passwords in plain text. This is a severe security vulnerability. Passwords must be hashed using a library like bcrypt before storage. - Critical: Use of synchronous file I/O (appendFileSync). This blocks the event loop and will cripple application performance under load. Must be changed to asynchronous methods. - Major: Lack of input sanitisation. The data.name and data.pass fields are concatenated directly. This could allow for file injection or malformed data records. Corrected snippet: const fs = require('fs').promises; const bcrypt = require('bcrypt'); async function saveUser(data) { const saltRounds = 10; const hash = await bcrypt.hash(data.pass, saltRounds); const entry = `${data.name}:${hash}\n`; await fs.appendFile('users.txt', entry); }

Variants

Quick Sanity Check

Focus strictly on finding critical bugs and security vulnerabilities only. Ignore style, readability, or minor performance nitpicks. Provide your response as a concise, bulleted list. The goal is a rapid pre-commit check rather than a comprehensive code review. Prioritise issues that could immediately crash the application or expose user data.

Junior Developer Mentor

Review this code as if you are mentoring a junior developer. Be encouraging and provide educational explanations for why each change is necessary. Explain the 'why' behind the best practices, such as modularity and cleaner variable naming, to help the developer learn and grow while improving their current code.

Performance Optimisation Focus

Specifically analyse this code for performance bottlenecks, memory leaks, and inefficient algorithms. Identify areas where complexity could be reduced from O(n^2) to O(n). Provide concrete refactoring suggestions that specifically improve execution speed and reduce memory consumption in high-traffic scenarios. Ignore general style conventions.

Common mistakes

Related guide

General and assistant-specific tips

Tips by assistant

  • Claude: ask for the result as an artifact to view and edit it separately from the chat.
  • ChatGPT: open the result in Canvas to edit specific paragraphs without regenerating the whole text.

Getting the most out of it

  • Paste the prompt as is and only replace what is in [brackets].
  • If the answer does not fit, do not start over: ask for “shorter”, “more formal” or “as a table”.
  • Always review the result before using it: AI can get facts, dates or names wrong.

Before you paste it: quick checklist

  • Remove client names, amounts and internal data before pasting.
  • Say who the text is for and which tone you want.
  • Ask for a specific length: “120 words max” or “three bullet points”.
  • Read the result aloud and fix anything you wouldn’t say yourself.

How to adapt it to your assistant

The template works the same in ChatGPT, Gemini, Copilot or Claude because it only uses plain language. If your assistant supports fixed instructions (custom instructions, Gems or projects), you can store your preferred tone and format there and paste only the variable part. On a free plan, split long requests into two or three shorter messages.

See all Work prompts

More professional prompts

← All prompts

Found this prompt useful? A new one every Tuesday

Every Tuesday, 5 minutes: AI news with sources, a tool with its prompt and a guide. Free, with one-click unsubscribe. What is inside and a sample issue