This skill should be used when the user asks to "merge a PR", "review and merge pull requests", "integrate external contributions", "handle PR conflicts", "cherry-pick from a PR", or needs to merge GitHub PRs while maximizing contributor attribution.
75
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Merge external pull requests while maximizing original author attribution. Core principle: merge first, resolve conflicts after — never rewrite a contributor's work from scratch.
gh pr merge --squash for clean PRs. For manual merges, use --author="Name <email>".--exclude when a PR contains features already implemented locally. Document what was excluded.git apply + self-commit — this loses author attribution entirely.gh pr list --repo OWNER/REPO --state open \
--json number,title,author,additions,deletions,mergeableClassify each PR: merge directly, merge with conflict resolution, selective merge, or close.
Prefer gh pr merge — preserves author automatically:
gh pr merge NUMBER --repo OWNER/REPO --squash \
--subject "feat: description (#NUMBER)"git fetch origin pull/NUMBER/head:pr-NUMBER
git merge pr-NUMBER --no-edit
# Resolve conflicts keeping both sides where possible
git add -A && git commit --no-editWhen a PR contains features already implemented locally:
gh pr diff NUMBER --repo OWNER/REPO | \
git apply --exclude='path/to/skip.py' --exclude='CHANGELOG.md'
git commit --author="Author Name <author@email>" \
-m "feat: description (#NUMBER)
Cherry-picked from PR #NUMBER. Excluded: file.py (already implemented)."gh pr close NUMBER --repo OWNER/REPO \
--comment "Fixed via PR #OTHER. Thank you for the contribution!"python -m ruff check src/ tests/ # lint
python -m pytest tests/ -q # unit tests
git push origin main # pushThen run harness-eval for end-to-end verification on an unfamiliar codebase.
Before pushing a merged PR:
git log (via --author or GitHub squash merge)#NUMBER)git apply + self-commit loses authorreferences/merge-scenarios.md — Detailed examples for each merge scenario (clean, conflicting, selective, duplicate)9b2efd7
Also appears in
since Aug 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.