Overview
A systematic playbook for preparing, reviewing, and documenting pull requests to ensure they are high-quality, free of common oversights, and optimized for instant maintainer approval and merging.
When to Use
- Use when preparing to open a new pull request on GitHub or any Git hosting platform.
- Use when self-auditing a feature or bug-fix branch for code cleanliness and consistency.
- Use when trying to minimize review cycles and speed up the integration of your changes.
Prerequisites
- Git installed and configured.
- A local feature branch with committed changes.
- Access to the target repository's
CONTRIBUTING.md and PR templates.
Procedure
Pre-Flight Clean Up & Rebase
Before presenting your code to reviewers, clean up any workspace noise and ensure your branch is up to date.
Critical Self-Review
Review your own diff line-by-line as if you were the reviewer. Look out for:
Local Verification & Test Suite
Verify that all changes work as expected:
- Run the project's automated test suite locally to verify no regressions are introduced.
- Check test coverage for any new code blocks you added.
- Manually test the critical paths and edge cases of your feature or bug fix.
Crafting the Pull Request Description
Write a high-signal, structured PR description. A great description tells the story of the changes:
- Summary: A concise explanation of the changes.
- Context / Why: Why this change is necessary and what problem it solves.
- Verification: Explicit details on how you tested it (test commands, screenshots, or step-by-step reproduction).
- Checklist: Conform to the repository's contributing guidelines and checklist requirements.
Examples
Example 1: Creating a Clean PR Description
# Pull Request: Implement Rate Limiting on Authentication Endpoint
## Summary
Introduces an IP-based rate limiter on the `/api/v1/auth/login` endpoint using Redis to prevent brute-force attacks.
## Why
We identified a high volume of login attempts targeting single accounts. This rate limiting window slows down attackers while keeping the system responsive for genuine users.
## Verification
- Ran unit tests: `npm run test tests/auth.test.js` (all green)
- Manually verified using Postman: sending 15 requests in under 60 seconds returns `429 Too Many Requests`.
## Checklist
- [x] Code follows the style guide
- [x] Unit tests added/updated
- [x] Documentation updated
Pitfalls
- Problem: A PR is left open for a long time due to minor formatting or style comments.
Solution: Always run the repository's local formatter (e.g., Prettier, ESLint, Black) before committing.
- Problem: Merge conflicts occur immediately after opening the PR.
Solution: Pull the latest main branch and rebase or merge it into your branch daily.
- Problem: Unrelated changes bundled into a feature PR.
Solution: Avoid sneaking refactoring or unrelated bug fixes into a feature PR. Create separate PRs instead.
- Problem: Ignoring CI failures.
Solution: Always fix failing tests, linters, or security scans on your branch before requesting a review.
Verification
Related skills
@pr-writer - For Sentry-specific PR writing guidelines.
@clean-code - To ensure code quality before submitting.
1---
2name: pr-merge-champion
3description: "Hardens a feature branch for reviewer speed: rebase-clean diffs, leftover-debug sweeps, local test evidence, and a why-plus-verification PR writeup. Use when the goal is fewer review cycles before a human merge. Not a GitHub lifecycle chair for gh pr create, CI watch, or squash-merge (github-pr-workflow) and not a local-only git chair (git-workflow)."
4version: 1.0.1
5category: workflow
6risk: safe
7source: self
8source_type: self
9date_added: "2026-06-16"
10tags: [git, github, pull-request, code-review, workflow]
11tools: [claude, cursor, gemini, antigravity]
12metadata:
13 source: https://skillmd.com/skills/kayforkind/pr-merge-champion
14---
15
16## Overview
17
18A systematic playbook for preparing, reviewing, and documenting pull requests to ensure they are high-quality, free of common oversights, and optimized for instant maintainer approval and merging.
19
20## When to Use
21
22- Use when preparing to open a new pull request on GitHub or any Git hosting platform.
23- Use when self-auditing a feature or bug-fix branch for code cleanliness and consistency.
24- Use when trying to minimize review cycles and speed up the integration of your changes.
25
26## Prerequisites
27
28- Git installed and configured.
29- A local feature branch with committed changes.
30- Access to the target repository's `CONTRIBUTING.md` and PR templates.
31
32## Procedure
33
341. **Pre-Flight Clean Up & Rebase**
35 Before presenting your code to reviewers, clean up any workspace noise and ensure your branch is up to date.
36 - Rebase your feature branch on top of the latest target branch (e.g., `main` or `master`) to resolve conflicts early.
37 ```powershell
38 git fetch origin
39 git rebase origin/main
40 ```
41 - Clean up untracked, temp, or swap files from your repository.
42 ```powershell
43 git clean -fd
44 ```
45 - Run local linters, formatters, and compilers to ensure no stylistic or syntax errors exist.
46
472. **Critical Self-Review**
48 Review your own diff line-by-line as if you were the reviewer. Look out for:
49 - Leftover debugging statements (e.g., `console.log`, `print`, breakpoints, or custom debug flags).
50 ```powershell
51 git diff | Select-String -Pattern "(console\.log|debugger|print\(|var_dump|binding\.pry)"
52 ```
53 - Unnecessary changes, white-space only diffs, or commented-out code blocks.
54 - Incomplete `TODO` comments that should be resolved or turned into tracked issues.
55 - Correctness of error handling and edge cases.
56
573. **Local Verification & Test Suite**
58 Verify that all changes work as expected:
59 - Run the project's automated test suite locally to verify no regressions are introduced.
60 - Check test coverage for any new code blocks you added.
61 - Manually test the critical paths and edge cases of your feature or bug fix.
62
634. **Crafting the Pull Request Description**
64 Write a high-signal, structured PR description. A great description tells the story of the changes:
65 - **Summary**: A concise explanation of the changes.
66 - **Context / Why**: Why this change is necessary and what problem it solves.
67 - **Verification**: Explicit details on how you tested it (test commands, screenshots, or step-by-step reproduction).
68 - **Checklist**: Conform to the repository's contributing guidelines and checklist requirements.
69
70## Examples
71
72### Example 1: Creating a Clean PR Description
73
74```markdown
75# Pull Request: Implement Rate Limiting on Authentication Endpoint
76
77## Summary
78Introduces an IP-based rate limiter on the `/api/v1/auth/login` endpoint using Redis to prevent brute-force attacks.
79
80## Why
81We identified a high volume of login attempts targeting single accounts. This rate limiting window slows down attackers while keeping the system responsive for genuine users.
82
83## Verification
84- Ran unit tests: `npm run test tests/auth.test.js` (all green)
85- Manually verified using Postman: sending 15 requests in under 60 seconds returns `429 Too Many Requests`.
86
87## Checklist
88- [x] Code follows the style guide
89- [x] Unit tests added/updated
90- [x] Documentation updated
91```
92
93## Pitfalls
94
95- **Problem:** A PR is left open for a long time due to minor formatting or style comments.
96 **Solution:** Always run the repository's local formatter (e.g., Prettier, ESLint, Black) before committing.
97- **Problem:** Merge conflicts occur immediately after opening the PR.
98 **Solution:** Pull the latest main branch and rebase or merge it into your branch daily.
99- **Problem:** Unrelated changes bundled into a feature PR.
100 **Solution:** Avoid sneaking refactoring or unrelated bug fixes into a feature PR. Create separate PRs instead.
101- **Problem:** Ignoring CI failures.
102 **Solution:** Always fix failing tests, linters, or security scans on your branch before requesting a review.
103
104## Verification
105
106- Ensure no unwanted files are staged:
107 ```powershell
108 git status --porcelain
109 ```
110- Ensure no leftover debug statements in the diff:
111 ```powershell
112 git diff | Select-String -Pattern "(console\.log|debugger|print\(|var_dump|binding\.pry)"
113 ```
114- Verify local tests pass before pushing.
115
116## Related skills
117
118- `@pr-writer` - For Sentry-specific PR writing guidelines.
119- `@clean-code` - To ensure code quality before submitting.