merge-pr-multiplelisted
Install: claude install-skill tony/ai-workflow-plugins
# Merge Multiple PRs
Land a set of pull requests one at a time: merge one, refresh trunk,
bring the next PR up to date (rebase, resolve conflicts, force-push,
wait on CI), then merge it — repeating until the set is landed or a
gate halts the run.
Read `references/merge-readiness.md` first; it
defines the readiness gate, the rebase procedure, the merge-message
derivation, flag passthrough, the `--admin` policy, and the rule that
merging is not releasing.
User arguments: $ARGUMENTS
## Context
Trunk — run this command and read the output:
```bash
git rev-parse --verify origin/main >/dev/null 2>&1 && echo main || echo master
```
Open PRs — run this command and read the output:
```bash
gh pr list --json number,title,headRefName,baseRefName,isDraft 2>/dev/null || echo "(gh unavailable)"
```
## Procedure
### 1. Assemble the roster
Take the PR set from the arguments, or from the PRs this
conversation has been working on. If the set is ambiguous — the
conversation touched more PRs than the user likely means, or an
argument doesn't match an open PR — present the candidates via
`ask-user-choice` and let the user pick. Show the final roster
before merging anything.
### 2. Detect the topology
Fetch `baseRefName` and `headRefName` for each PR. If any PR's base
branch is another PR's head branch, the set is a **stack**: order
bottom-up, each PR merging only after its parent. Otherwise the set
is **independent**: honor the order the user gave, falling back to
ascending PR number