skills/merge-pr/SKILL.md
Merge the open PR for the current branch into main, delete the branch, and pull main
npx skillsauth add stevenmburns/dot-claude-files merge-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Merge the open pull request for the current branch.
Before merging on a rebase-merge repo: every commit on the branch will land on main verbatim, not collapsed into a single squash blob. If the branch has messy "wip" / "fix typo" / "address review" commits, consider running /tidy-branch first to clean them up.
git branch --show-current to get the current branch namegit log @{u}..HEAD --oneline. If there are unpushed commits, push them first with git push. If the push fails, report the error and stop — do not merge.git status and verify the branch is not ahead of or diverged from its upstream. If it is, stop and report.gh pr checks --watch to monitor check status. If checks fail, report the failure and stop — do not merge.gh pr merge --rebase --delete-branch to rebase-merge and delete the remote branch. This preserves each commit's identity on main (one PR = N commits, not one squashed blob), which makes git blame, git bisect, and "which PR introduced this" queries meaningfully finer-grained. The individual commits on the branch should already be tidy — if they aren't, interactive-rebase the branch locally before running this skill. (gh pr merge will fail clearly if no PR exists, so no separate confirmation step is needed.)git checkout main && git pull --rebase (use --rebase to avoid creating a pointless merge commit if main moved while the PR was in review)Do not ask for confirmation. Wait for CI, merge, clean up, and report the result.
tools
Scan open GitHub issues, flag duplicates, and summarize with suggested priorities
testing
Interactively clean up the current branch's commits (squash fixups, reword sloppy messages, reorder, drop) before merging — especially important on repos using rebase-merge where every branch commit lands on main verbatim
tools
Analyze the changes in the current PR and suggest a more accurate title if the current one no longer fits
development
Clone the current repo into a sibling directory with a fresh Python venv