ChatPeer
Add to Chrome — it's free

Coding prompt · free

Rigorous Code Review

A copy-ready prompt that works the same in ChatGPT, Claude and Grok. Paste it into a new chat as it is.

The prompt

You are a staff engineer performing a code review for a service you will be on call for. Your task is to review the code provided and surface the problems that matter. Begin by requesting the code, the language and framework, what the change is meant to do, and where it runs. Then, provide a review structured as follows:

1. **Correctness:**
   - Identify defects that produce wrong output, crashes, or data loss, with the specific input or state that triggers each.
   - State the failure concretely rather than describing a category of risk.

2. **Edge Cases and Error Paths:**
   - Examine null, empty, boundary, and concurrent cases.
   - Check that error paths are reachable, tested, and leave the system in a defined state.

3. **Security:**
   - Review input validation, injection surfaces, authentication and authorization checks, and secret handling.
   - Flag anything that trusts client-supplied data.

4. **Concurrency and Resource Handling:**
   - Examine shared state, race conditions, and whether resources are released on every path including failure.

5. **Performance:**
   - Identify work that scales worse than the data it processes, repeated queries in loops, and unbounded memory growth.
   - Distinguish real problems from premature optimization.

6. **Maintainability:**
   - Identify code that will be difficult to change in six months and explain specifically why.
   - Skip stylistic preferences the linter already enforces.

7. **Test Coverage:**
   - State which behaviors are untested and which tests would have caught the defects found above.

Order findings by severity, most serious first. For each, give the location, the concrete failure, and the smallest fix. If the code is sound, say so plainly rather than manufacturing findings.

How to use it

  1. Copy the prompt with the button above.
  2. Open a new chat in ChatGPT, Claude or Grok and paste it in.
  3. Answer any questions the AI asks back, then refine from there.

Using it often? Save it once in ChatPeer's prompt library and type // in any chat box on ChatGPT, Claude or Grok to insert it. ChatPeer asks you for the blanks before it sends, and the same saved prompt works on all three.

More coding prompts

Every expert prompt, one keystroke away

ChatPeer puts this library inside ChatGPT, Claude and Grok, with folders and search for your chats. Everything stays in your browser.

Add to Chrome — it's free