- Claude Code
- Skill
- Advanced
- Claude Code
- Claude
- Codex
- Published
Pre-Merge Code Review Checklist Skill (SKILL.md)
A save-ready SKILL.md that has your coding agent review a branch before merge: correctness, security, tests and migrations, with findings ranked by severity and no style nitpicks.
You get: A filled-in template
Ready to use: no blanks to fill in.
The prompt
Installs to .agents/skills/pre-merge-code-review-checklist-skill-skill-md/
mkdir -p .agents/skills/pre-merge-code-review-checklist-skill-skill-md && curl -sL "https://prompts-gpt.com/prompts/pre-merge-code-review-checklist-skill-skill-md/raw" -o .agents/skills/pre-merge-code-review-checklist-skill-skill-md/SKILL.md---
name: pre-merge-review
description: Reviews the current branch against its base before merge, ranking findings by severity. Use when the user asks for a review, asks whether a branch is ready to merge, or says "check my changes".
---
# Pre-merge review
## Steps
1. Find the base branch (main or master unless told otherwise) and run `git diff base...HEAD`. Read the full files around each change, not just the hunks.
2. Run the project's test, typecheck and lint commands (look in package.json, Makefile, pyproject.toml or the CI config). Record pass or fail.
3. Check, in this order:
- Correctness: wrong conditions, off-by-one errors, unhandled null or empty values, broken error paths, race conditions.
- Security: unvalidated input, injection, missing auth checks, secrets in code or logs, unsafe deserialisation.
- Data: migrations that lock tables or lose data, missing backfills, irreversible changes.
- Tests: changed behaviour without a test, tests that cannot fail.
- Performance: queries in loops, unbounded lists, work on the hot path.
4. For each finding, describe the concrete input or state that triggers the failure. Drop any finding you cannot make concrete.
5. Skip formatting and naming issues that a linter or formatter already covers.
## Output format
Verdict: ready, ready after fixes, or not ready.
Table: Severity (blocking, should fix, nit), File:line, Problem, Failure scenario, Suggested fix.
Then: check results, and questions for the author.
## Stop and ask
- No base branch can be found.
- Checks need credentials or services that are not available; report this instead of skipping silently.
## Risks
False confidence from a clean review. State what was not checked, such as untested paths or missing integration tests.Tips and common edits
Save as .claude/skills/pre-merge-review/SKILL.md in a repo, or ~/.claude/skills/pre-merge-review/SKILL.md for every project. Claude Code loads it when the description matches; the same file works in Codex, Cursor and Gemini CLI, which also read SKILL.md.
Questions about this prompt
More like this
More in Claude CodeConventional Commit and PR Description Writer Skill (SKILL.md)
A ready-to-save SKILL.md that makes your coding agent write Conventional Commits messages and pull request descriptions from the staged diff, never from guesses.
Test-First Bug Fix Skill: Reproduce, Fix, Prove (SKILL.md)
A SKILL.md that forces your coding agent to reproduce a bug with a failing test before changing code, apply the smallest fix, and prove it with the test suite.
Release Notes From Git Log Skill for Users and Developers (SKILL.md)
A SKILL.md that writes release notes from the commits between two tags, split into a plain-language section for users and a technical changelog for developers.
Brand Voice Guard Skill That Checks Drafts Against VOICE.md (SKILL.md)
A SKILL.md that makes Claude write and edit in your brand's voice: it reads a VOICE.md in the project, or builds one from samples, then checks every draft against it.
Meeting Notes to Decisions and Action Items Skill (SKILL.md)
A SKILL.md that turns any meeting transcript or rough notes into a decision log, owner-and-date action items, open questions and a ready-to-send recap email.
Spreadsheet and CSV Cleanup Report Skill (SKILL.md)
A SKILL.md that has your agent profile a messy CSV or spreadsheet, fix it in a copy with a script, and report every change so the cleaned data can be trusted.
Write a SKILL.md From a Workflow You Keep Repeating
Interviews you about a task you do over and over, then writes a complete, save-ready SKILL.md with a trigger description, steps, output format and stop conditions.
Coding Agent Task Brief with Guardrails, Test Plan, and Rollback Steps
Creates a scoped brief for an AI coding agent that limits file changes, defines tests, and includes a rollback plan and review checklist.
Codex Writes an AGENTS.md for This Repository From the Real Setup
Has Codex inspect your repository and write a short, accurate AGENTS.md with the real build, test and lint commands, conventions and boundaries, checked by actually running them.
Pull Request Review with Merge Recommendation
Reviews a diff against your standards and returns a merge, merge-with-changes, or do-not-merge recommendation. Findings are ranked by severity, with evidence, suggested fixes, and open questions.
Characterization Tests Before a Refactor
Writes tests that lock in a module's current behavior, including edge cases and quirks, so you can refactor safely.
Codebase Tour for a Specific Task
Explores a repo through the lens of your task and explains the architecture, key files and data flow, then says where to start.