Claude Code

Verified against Claude Code · 2026-08-02

Turn a raw diff into a pull request description a reviewer can actually use

A format-forced, audience-aware prompt that turns a raw diff into a structured pull request description written for a reviewer who has not opened the files yet, instead of a generic one-line summary.

Claude CodeCursorGitHub Copilot4 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

You are writing this pull request description for a reviewer who has not opened the diff yet and, realistically, will not read every changed line before deciding how carefully to review it. Write for that reader, not for yourself, having just read every line of the change.

TICKET OR CONTEXT
JIRA-4821 — zero-row CSV export throws a TypeError

HOW FAMILIAR IS THE LIKELY REVIEWER WITH THIS AREA OF THE CODE
The usual reviewer for this file has moved teams; the person reviewing this time has never touched the reports module.

TESTS THAT EXIST IN THIS AREA TODAY
tests/reports/export.spec.ts, 22 tests currently, run via npm run test -- reports/export

FORMAT
Summary — one or two sentences on what changed and why, in plain language, with no implementation detail yet.
Why — the problem or requirement that made this change necessary, linking the ticket above if one exists.
What changed — a bullet list grouped by area or feature, not by file; a reviewer thinks in features, not in a file tree, and a list organized by file forces them to reconstruct the feature-level story themselves.
How this was tested — exactly what was run, referencing the tests named above by name where relevant, and what the actual result was. Not 'tests pass' alone — name the suite and the count.
Risk and rollback — what is the actual blast radius if this change is wrong in production, and how would it be reverted or disabled quickly if so.
This deploys behind a feature flag already on for 5% of accounts; full rollout is a separate, later step.

CONSTRAINTS
- Do not describe the diff line by line. Describe intent and effect, at the level a reviewer who has not opened the files yet needs to decide where to look first.
- Do not claim a test was run or a case was verified manually unless you can name the specific thing that was actually run or checked.
- If the diff contains a change unrelated to the stated purpose above, call it out explicitly under What changed rather than omitting it because it does not fit the summary's narrative.
- If The usual reviewer for this file has moved teams; the person reviewing this time has never touched the reports module. indicates the reviewer is not deeply familiar with this area, add one extra sentence of orientation under Why — the context an unfamiliar reviewer needs to evaluate the change at all, not just what it does.
- Keep the whole description skimmable in under sixty seconds; it is a routing document for the reviewer's attention, not the full explanation of the change.
- If the diff touches a file with no existing test coverage named in tests/reports/export.spec.ts, 22 tests currently, run via npm run test -- reports/export, say so plainly under How this was tested rather than letting the section read as complete when part of the change is genuinely unverified by anything automated.

Paste the diff, or the output of git diff, below this line, unedited.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

Asked to summarize a diff with no format, a model reliably writes from its own vantage point — it just read every changed line, so it under-explains, producing the generic 'this pull request updates the checkout flow' that tells a reviewer nothing about what to actually look at. Explicitly naming the reader as a reviewer who has not seen the diff yet is a documented technique for calibrating output to an audience rather than just a format: the instruction changes what the model chooses to include, not only how it is arranged. Forcing a fixed section template of summary, why, what changed, how tested, and risk does two things at once — it prevents the generic one-liner, and it makes an incomplete description visually obvious, since an empty or vague how-tested section is far easier for a human to notice and reject than a missing sentence buried in a paragraph. Conditioning an extra orientation sentence on the stated reviewer-familiarity variable is something a repo-aware agentic tool can actually do well that a generic chat session pasted a diff cannot: because Claude Code has already read the surrounding code in this session, it can calibrate what an unfamiliar reviewer specifically needs explained about this module, rather than guessing at a generic level of background a stranger to the whole codebase would need. The explicit instruction to flag unrelated changes rather than omit them also counters a real failure mode of diff summarization: a model asked to describe the change will describe the change it judges most relevant to the stated purpose, silently dropping a drive-by edit a reviewer actually needed to see. Requiring an explicit callout when a touched file has no named test coverage matters for the same reason the how-tested section exists at all: a description that only ever states what was tested, and never what was not, lets an untested code path hide behind a section that reads as thorough simply because it is present and specific about the parts that were checked.

What you get back

Summary: Fixes CSV export throwing an error when a report has zero rows. Why: JIRA-4821 — three customers hit this in the last week filtering to an empty date range. The export path lives in lib/reports/export.ts, which the reports module owns end to end. What changed: Reporting/export — guarded the average-row calculation against a zero total instead of dividing into NaN. How this was tested: added one case to tests/reports/export.spec.ts and re-ran the full file, 23 of 23 passed (previously 22). Risk and rollback: low risk, one-line guard on a pure function; revert is a single commit revert with no data migration.

Verified against

Claude Code Sonnet 4.6 · 2026-08-02

GitHub Copilot Copilot Chat 1.252 (VS Code) · 2026-08-02

Changelog

  • 2026-08-02 Initial publish, verified against Claude Code (Sonnet 4.6) and GitHub Copilot Chat.

Building this for real?

This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
All Claude Code prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY