Refactor for readability, same behaviour
Model notes: Any model
Fill in the variables (optional — they're inserted live below):
Refactor this code for readability without changing behaviour:
```
{{code}}
```
Constraints: same public interface, same outputs, no new dependencies. Explain each change in one line. If a change could alter behaviour in an edge case, call it out explicitly. Suggest tests that would prove behaviour is unchanged.
How to use it
- Fill the variables above, or replace each
{{variable}}after pasting. - Paste into your AI tool (ChatGPT, Claude, Gemini, Cursor, Claude Code, or a local model in Ollama/LM Studio).
- Review the output. Models make mistakes, especially with facts, numbers and code.
Get all 209 prompts + agent workflows
Every prompt as Markdown and JSON, 10 multi-step agent workflows, and 12 ready-made slash commands for Cursor and Claude Code. Instant zip download, one-time purchase.
More Code review prompts
Code review
PR description writer
Any model, great on local 7B+
Variables: diff
Write a pull request description from this diff:
```diff
{{diff}}
```
Format: **Summary** (2-3 sentences, the why), **Changes** (bullets), **How to test** (numbered steps), **Risks / rollout notes**, **Screenshots** (placeholder if UI changed). Be factual; don't describe changes that aren't in the diff. Write a pull request description from this diff:
```diff
{{diff}}
```
Format: **Summary** (2-3 sentences, the why), **Changes** (bullets), **How to test** (numbered steps), **Risks / rollout notes**, **Screenshots** (placeholder if UI changed). Be factual; don't describe changes that aren't in the diff.
Open & fill variables: PR description writer → Code review
Dependency upgrade risk check
Paste the changelog if you have it
Variables: packageold_versionnew_versionstack
I'm upgrading {{package}} from {{old_version}} to {{new_version}} in a {{stack}} project.
1. List the breaking changes between these versions you know of (say if unsure about any; your knowledge may be outdated, so tell me where to verify).
2. Show me how to search my codebase for affected usages (grep patterns).
3. Give an upgrade plan with a rollback step. I'm upgrading {{package}} from {{old_version}} to {{new_version}} in a {{stack}} project.
1. List the breaking changes between these versions you know of (say if unsure about any; your knowledge may be outdated, so tell me where to verify).
2. Show me how to search my codebase for affected usages (grep patterns).
3. Give an upgrade plan with a rollback step.
Open & fill variables: Dependency upgrade risk check → Code review
Reply to review comments
Any model
Variables: diff_or_codereview_comments
I got these review comments on my pull request. Help me respond well.
My change:
{{diff_or_code}}
Review comments:
{{review_comments}}
For each comment:
1. Is the reviewer right, partly right, or mistaken? Explain in one or two sentences, based on the code.
2. Suggested action: change the code (show the change), push back politely (with a reason), or ask a clarifying question.
3. A short, friendly reply I can post. No defensiveness, no grovelling.
If two comments conflict, point that out. If a comment reveals a real bug I missed, put it at the top. I got these review comments on my pull request. Help me respond well.
My change:
{{diff_or_code}}
Review comments:
{{review_comments}}
For each comment:
1. Is the reviewer right, partly right, or mistaken? Explain in one or two sentences, based on the code.
2. Suggested action: change the code (show the change), push back politely (with a reason), or ask a clarifying question.
3. A short, friendly reply I can post. No defensiveness, no grovelling.
If two comments conflict, point that out. If a comment reveals a real bug I missed, put it at the top.
Open & fill variables: Reply to review comments → Code review
Breaking-change check before a release
Any model; for libraries, public APIs and SDKs
Variables: package_namecurrent_versiondiff
I maintain {{package_name}}, currently at version {{current_version}}. Review this diff for changes that could break people who depend on it:
```diff
{{diff}}
```
Check for: removed or renamed exports, functions, endpoints or fields; changed parameter order, types or defaults; stricter validation; changed error types or status codes; changed output shape; behaviour changes behind the same signature; raised minimum runtime or dependency versions.
For each finding: what breaks, who is affected, and how to keep it backwards-compatible (deprecation, alias, optional parameter) if that's reasonable.
Then recommend the next version number under semantic versioning (major / minor / patch) and draft the "Breaking changes" section of the release notes. If nothing breaks, say so. I maintain {{package_name}}, currently at version {{current_version}}. Review this diff for changes that could break people who depend on it:
```diff
{{diff}}
```
Check for: removed or renamed exports, functions, endpoints or fields; changed parameter order, types or defaults; stricter validation; changed error types or status codes; changed output shape; behaviour changes behind the same signature; raised minimum runtime or dependency versions.
For each finding: what breaks, who is affected, and how to keep it backwards-compatible (deprecation, alias, optional parameter) if that's reasonable.
Then recommend the next version number under semantic versioning (major / minor / patch) and draft the "Breaking changes" section of the release notes. If nothing breaks, say so.
Open & fill variables: Breaking-change check before a release → New prompts every week
One short email a week: new tested prompts and agent workflows. Free. Unsubscribe any time.