Merge Check
Predicts whether a GitHub PR will get merged by analyzing it against a comprehensive rejection vector taxonomy. Not a generic code quality tool — this answers: "Will this PR get merged by the maintainer?"
Quick Start
- Run the data gathering script:
bash skills/merge-check/scripts/merge-check.sh owner/repo#123
# or
bash skills/merge-check/scripts/merge-check.sh https://github.com/owner/repo/pull/123
- Parse the JSON output
- Analyze against the dimensions below
- Produce the mergeability report
Analysis Dimensions
After gathering data, analyze across ALL of these dimensions. Load skills/merge-check/references/rejection-taxonomy.md for the detailed rejection vector framework.
1. Technical Signals (Automated Gates)
- CI status: Are all checks passing? Any failed or pending?
- Build status: Does it compile/build?
- Coverage: Any coverage regression indicated?
2. PR Hygiene
- Size (most predictive single factor):
- 🟢 <400 LOC changed — ideal, easy to review
- 🟡 400–1000 LOC — risky, reviewer fatigue
- 🔴 >1000 LOC — danger zone, likely to stall or get rejected
- File spread: Concentrated in one area or scattered across directories?
- Single concern: Does it do one thing, or is it a kitchen-sink PR?
- Title & description: Clear, descriptive? Or vague/empty?
- Linked issue: Does it reference an issue? (Signals intentionality)
- Commit hygiene: Clean messages? Reasonable count? Squash-ready?
3. Architectural Fit
- Pattern consistency: Does it follow repo conventions? (language, directory structure, naming)
- Dependencies: New dependencies introduced? (High friction signal)
- Scope creep: Does it touch things outside its stated purpose?
- File types: Consistent with repo's tech stack?
4. Review Status
- Approvals: Any already? How many required?
- Changes requested: Outstanding and unaddressed? (Strong rejection signal)
- Reviewer assignment: Are required reviewers assigned?
- Review comment sentiment: Positive, neutral, or adversarial?
- CODEOWNERS: Does the PR touch files with code owners? Are they reviewing?
5. Process Compliance
- Draft status: Draft PRs won't merge
- Blocking labels: WIP, do-not-merge, needs-work, etc.
- PR template: Was it followed? (Empty template = red flag)
- CLA/DCO: If repo requires it, is it signed?
6. Social/Meta Signals
- Author merge history: What % of this author's recent PRs were merged in this repo?
- Staleness: How long has it been open? (>2 weeks = concern, >30 days = likely abandoned)
- Activity level: Recent comments/updates, or radio silence?
- First-time contributor: Higher rejection rate for newcomers
Output Format
Produce a structured report:
Mergeability Score
- 🟢 High (>80% likely to merge) — No blockers, reviews positive, CI green
- 🟡 Medium (40–80%) — Some concerns but addressable
- 🔴 Low (<40%) — Significant blockers present
Report Sections
- Mergeability Score: 🟢/🟡/🔴 with percentage estimate
- Risk Factors: Bullet list of specific concerns, ordered by severity
- Strengths: What's working in the PR's favor
- Recommendations: Actionable steps to improve mergeability (if not already 🟢)
- Verdict: One-sentence summary
Example Output
## PR Mergeability Report: owner/repo#123
**Score: 🟡 Medium (~55%)**
### Risk Factors
- ⚠️ 847 lines changed — approaching reviewer fatigue threshold
- ⚠️ Changes requested by @maintainer not yet addressed
- ⚠️ Touches 12 files across 6 directories — scattered scope
- ℹ️ No linked issue
### Strengths
- ✅ All 14 CI checks passing
- ✅ Clear title and detailed description
- ✅ Author has 73% merge rate in this repo (8/11 recent PRs)
- ✅ Active discussion — last update 2 hours ago
### Recommendations
1. Address @maintainer's review comments before requesting re-review
2. Consider splitting into smaller PRs (config changes vs logic changes)
3. Link the relevant issue for traceability
### Verdict
Solid PR with passing CI and an active author, but stalled on unaddressed review feedback — resolving those comments is the critical path to merge.
Script Reference
The script (scripts/merge-check.sh) gathers all data via gh CLI and outputs a single JSON object with these keys:
| Key |
Contents |
pr |
Full PR metadata (title, body, author, state, draft, labels, reviewers) |
files |
List of changed files with patch stats |
diff_stats |
Total additions, deletions, changed files count |
checks |
CI/check run results for the head commit |
reviews |
All reviews (approved, changes_requested, commented) |
review_comments |
Inline review comments |
issue_comments |
PR conversation comments |
commits |
Commit list with messages |
repo |
Repository metadata (language, size, defaults) |
author_history |
Author's recent closed PRs and merge rate |
has_codeowners |
Boolean |
has_contributing |
Boolean |
Error Handling
The script outputs "error" fields when individual API calls fail (e.g., rate limits, 404s). Analyze what's available and note any missing data in the report.
1---
2name: merge-check
3description: Analyze a GitHub pull request for mergeability — predict whether it will get merged based on technical, architectural, process, social, and compliance factors. Use when asked to review a PR, check if a PR will be merged, assess PR quality, or predict PR acceptance. Works with any GitHub PR via `owner/repo#number` or URL.
4metadata:
5 source: https://skillmd.com/skills/modbender/merge-check
6---
7
8# Merge Check
9
10Predicts whether a GitHub PR will get merged by analyzing it against a comprehensive rejection vector taxonomy. Not a generic code quality tool — this answers: **"Will this PR get merged by the maintainer?"**
11
12## Quick Start
13
141. Run the data gathering script:
15 ```bash
16 bash skills/merge-check/scripts/merge-check.sh owner/repo#123
17 # or
18 bash skills/merge-check/scripts/merge-check.sh https://github.com/owner/repo/pull/123
19 ```
202. Parse the JSON output
213. Analyze against the dimensions below
224. Produce the mergeability report
23
24## Analysis Dimensions
25
26After gathering data, analyze across ALL of these dimensions. Load `skills/merge-check/references/rejection-taxonomy.md` for the detailed rejection vector framework.
27
28### 1. Technical Signals (Automated Gates)
29- **CI status**: Are all checks passing? Any failed or pending?
30- **Build status**: Does it compile/build?
31- **Coverage**: Any coverage regression indicated?
32
33### 2. PR Hygiene
34- **Size** (most predictive single factor):
35 - 🟢 <400 LOC changed — ideal, easy to review
36 - 🟡 400–1000 LOC — risky, reviewer fatigue
37 - 🔴 >1000 LOC — danger zone, likely to stall or get rejected
38- **File spread**: Concentrated in one area or scattered across directories?
39- **Single concern**: Does it do one thing, or is it a kitchen-sink PR?
40- **Title & description**: Clear, descriptive? Or vague/empty?
41- **Linked issue**: Does it reference an issue? (Signals intentionality)
42- **Commit hygiene**: Clean messages? Reasonable count? Squash-ready?
43
44### 3. Architectural Fit
45- **Pattern consistency**: Does it follow repo conventions? (language, directory structure, naming)
46- **Dependencies**: New dependencies introduced? (High friction signal)
47- **Scope creep**: Does it touch things outside its stated purpose?
48- **File types**: Consistent with repo's tech stack?
49
50### 4. Review Status
51- **Approvals**: Any already? How many required?
52- **Changes requested**: Outstanding and unaddressed? (Strong rejection signal)
53- **Reviewer assignment**: Are required reviewers assigned?
54- **Review comment sentiment**: Positive, neutral, or adversarial?
55- **CODEOWNERS**: Does the PR touch files with code owners? Are they reviewing?
56
57### 5. Process Compliance
58- **Draft status**: Draft PRs won't merge
59- **Blocking labels**: WIP, do-not-merge, needs-work, etc.
60- **PR template**: Was it followed? (Empty template = red flag)
61- **CLA/DCO**: If repo requires it, is it signed?
62
63### 6. Social/Meta Signals
64- **Author merge history**: What % of this author's recent PRs were merged in this repo?
65- **Staleness**: How long has it been open? (>2 weeks = concern, >30 days = likely abandoned)
66- **Activity level**: Recent comments/updates, or radio silence?
67- **First-time contributor**: Higher rejection rate for newcomers
68
69## Output Format
70
71Produce a structured report:
72
73### Mergeability Score
74- 🟢 **High** (>80% likely to merge) — No blockers, reviews positive, CI green
75- 🟡 **Medium** (40–80%) — Some concerns but addressable
76- 🔴 **Low** (<40%) — Significant blockers present
77
78### Report Sections
791. **Mergeability Score**: 🟢/🟡/🔴 with percentage estimate
802. **Risk Factors**: Bullet list of specific concerns, ordered by severity
813. **Strengths**: What's working in the PR's favor
824. **Recommendations**: Actionable steps to improve mergeability (if not already 🟢)
835. **Verdict**: One-sentence summary
84
85### Example Output
86```
87## PR Mergeability Report: owner/repo#123
88
89**Score: 🟡 Medium (~55%)**
90
91### Risk Factors
92- ⚠️ 847 lines changed — approaching reviewer fatigue threshold
93- ⚠️ Changes requested by @maintainer not yet addressed
94- ⚠️ Touches 12 files across 6 directories — scattered scope
95- ℹ️ No linked issue
96
97### Strengths
98- ✅ All 14 CI checks passing
99- ✅ Clear title and detailed description
100- ✅ Author has 73% merge rate in this repo (8/11 recent PRs)
101- ✅ Active discussion — last update 2 hours ago
102
103### Recommendations
1041. Address @maintainer's review comments before requesting re-review
1052. Consider splitting into smaller PRs (config changes vs logic changes)
1063. Link the relevant issue for traceability
107
108### Verdict
109Solid PR with passing CI and an active author, but stalled on unaddressed review feedback — resolving those comments is the critical path to merge.
110```
111
112## Script Reference
113
114The script (`scripts/merge-check.sh`) gathers all data via `gh` CLI and outputs a single JSON object with these keys:
115
116| Key | Contents |
117|-----|----------|
118| `pr` | Full PR metadata (title, body, author, state, draft, labels, reviewers) |
119| `files` | List of changed files with patch stats |
120| `diff_stats` | Total additions, deletions, changed files count |
121| `checks` | CI/check run results for the head commit |
122| `reviews` | All reviews (approved, changes_requested, commented) |
123| `review_comments` | Inline review comments |
124| `issue_comments` | PR conversation comments |
125| `commits` | Commit list with messages |
126| `repo` | Repository metadata (language, size, defaults) |
127| `author_history` | Author's recent closed PRs and merge rate |
128| `has_codeowners` | Boolean |
129| `has_contributing` | Boolean |
130
131## Error Handling
132
133The script outputs `"error"` fields when individual API calls fail (e.g., rate limits, 404s). Analyze what's available and note any missing data in the report.