Agent skill · mia-cx

pr-merge

Use when the user asks to merge or land a pull request, or says "ship it" for an already-reviewed PR.

What it needs

About 4k tokens when loaded.

What this skill does

Merge a pull request Read the PR, post a flavourful comment, merge with a clean subject, close its linked issues, fast-forward the local base branch. The user's request to merge is authoritative confirmation that required human validation is complete. Do not leave the PR or a linked issue open because a validation checkbox or comment was not separately updated first. Workflow 1. Identify and read the PR Use the provided PR number/URL; otherwise gh pr list --state open and pick the obvious one (ask only if genuinely ambiguous). gh pr view <number> --json title,body,headRefName,baseRefName,commits,files,reviews,comments,labels,milestone and gh pr diff <number> to understand what the PR actually delivers. Record every open issue directly referenced by the PR body or commits (#N, Fixes #N, Closes #N) for closing after the merge. Do not recursively close parent, dependency, or related issues mentioned only inside those linked issues. 2. Check merge readiness CI passing: gh pr checks <number> Required approvals present (reviews from step 1) No conflicts: gh pr view <number> --json mergeable If the PR is not ready, report the blockers and stop. Do not merge a PR that isn't green. 3. Retarget any stacked children first Before merging, find open PRs whose base is this PR's head branch: Retarget each onto this PR's base before the merge: Do not skip this and rely on GitHub retargeting them for you. Deleting a branch that is still the base of an open PR closes that PR, and the recovery is awkward: a closed PR cannot be retargeted, and it cannot be reopened while its base branch is missing. You have to push the deleted branch back, reopen, retarget, then delete it again. GitHub's own retarget-on-merge does not reliably beat the branch deletion to it. gh pr edit --base is the obvious command and it fails on repos with Projects (classic) enabled, so prefer the REST call above. 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills mia-cx/pr-merge

View the source on GitHub

Browse the @skills marketplace