- AI Coding Agents
- Agent
- Advanced
- Claude Code
- Published
Pre-Merge Self-Review of a Git Diff: Correctness, Security, and Test Gaps
Has Claude Code review a branch diff like a skeptical maintainer, producing severity-ranked findings with evidence and a clear merge, fix, or block recommendation. Use it before opening or approving a pull request.
You get: Job-to-be-done and decision supported, summary verdict and findings table
The prompt
mkdir -p .agents/skills/pre-merge-self-review-of-a-git-diff-correctness-security-and-tes && curl -sL "https://prompts-gpt.com/prompts/pre-merge-self-review-of-a-git-diff-correctness-security-and-test-gaps/raw" -o .agents/skills/pre-merge-self-review-of-a-git-diff-correctness-security-and-tes/SKILL.mdTips and common edits
Run from a clean checkout of the head branch. For large diffs, run once per directory and merge the results. Supply risk areas so the review spends effort where failure costs the most.
Questions about this prompt
More like this
More in AI Coding AgentsAgent Session Handoff Brief with Resume Checklist and Verified State
Makes Claude Code produce a handoff file capturing goal, verified repo state, decisions, blockers, and exact resume commands so another engineer or agent session can continue without rework. Use it before ending a long task.
Characterization-Test-Backed Refactor with Incremental Commits
Guides Claude Code to refactor a module safely by first pinning current behavior with characterization tests, then making small, reversible commits. Helps you decide whether the refactor preserved behavior and is worth merging.
Claude Code Repo Recon and Implementation Plan for a New Feature
Has Claude Code inspect a repository read-only and produce an evidence-based implementation plan with file-level changes, tests, risks, and open questions. Use it to decide whether to start, split, or clarify a feature before any code is written.
Reproduce-First Bug Fix: Failing Test, Minimal Patch, and Regression Proof
Directs Claude Code to reproduce a reported bug with a failing test, apply the smallest fix, and prove the fix with command output. Use it to decide whether a bug is fixed and safe to merge.
Codex Pre-Merge Diff Review with Severity-Ranked Findings
Has Codex review a branch diff against a base ref in read-only mode. It checks correctness, tests, security, and maintainability, and returns evidence-backed findings with severity and a merge recommendation.
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.
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.
Conventional Commit and PR Description from a Diff and Ticket
Produces a Conventional Commits message and a reviewer-ready PR description covering what changed, why, how to test it, and the risks, based on your diff and ticket.
Pre-PR Self-Review and Pull Request Description from a Git Diff
Has GitHub Copilot review your branch diff against the base branch, flag defects and missing tests, and draft a PR description with evidence. Use it to decide whether to open the PR or fix issues first.
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.
Agent Run Post-Mortem: Trace Root Cause and Prompt or Tool Fixes
Analyzes a pasted agent trace to find the first real failure and proposes exact prompt rewrites or tool changes, each with a test.
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.