/ship-it:merge-itfrom ship-it
Merges one PR or a set of PRs in the right order (stacks bottom-up), after checking CI and reviews, with user approval unless the project's rules allow merging without it. Waits for post-merge automated commits between merges.
Ships in ship-it. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Phase 4a of /ship-it, before /ship-it:sync-it. Also runs on its own.
Projects can spell out how this step runs for them. Unless /ship-it already handed you this
step's section, look for the project's ship-it instructions and use the first file that exists:
AGENTS_ship-it.md in the repo rootAGENTS/AGENTS_ship-it.mddocs/ship-it.mdRead only the ## merge-it section. Where it conflicts with the defaults in this skill, the
section wins; anything it leaves out falls back to the defaults. No file, or no ## merge-it
section, means use the defaults. Say in your report which file and section you used, or that
there were none.
Things the section typically sets: merge method, when merging needs no approval, ordering rules for independent PRs, automated commits to wait for after a merge, and issue trackers to leave alone in Step 5.
/ship-it:merge-it, or asks to merge a PR or a stack of PRs./ship-it reaches Phase 4a.<owner>/<repo> and the platform come from git remote get-url origin.Re-check each PR right before its turn, since earlier merges change things.
| Check | Gitea | GitHub |
|---|---|---|
| Open and mergeable | gt pr view <n> --json state,mergeable: open, true | gh pr view <n> --json state,mergeable: OPEN, MERGEABLE |
| No changes requested | gt api "/repos/<owner>/<repo>/pulls/<n>/reviews": no latest review per reviewer with state == "REQUEST_CHANGES" | gh pr view <n> --json reviewDecision: not CHANGES_REQUESTED |
| CI green | /ship-it:verify-it on the PR head commit | same |
Skip the CI watch when the caller already watched this exact head commit and it passed. "No CI" is not a failure. If any check fails, stop before merging this PR; PRs already merged stay merged. Report which PR stopped and why.
The default is to ask before merging. Show the PRs in merge order with title, base, and merge method, and wait for the user's answer.
Do not ask when either is true:
## merge-it section says this PR can merge without approval, and the PR meets
its condition. Check the condition against the facts, e.g. the PR's changed files
(git diff --name-only <base>...<head>), labels, or author. When it applies, say which rule
matched. If it is unclear whether it applies, ask.Approval can differ per PR: merge those that are approved, and stop at the first one that isn't, since everything stacked above it has to wait anyway.
Use the project's merge method, else the repository default (merge commit).
gt pr merge <n> --method <merge|squash|rebase|rebase-merge>gh pr merge <n> --<merge|squash|rebase>Do not delete the head branch here; /ship-it:prune-it does that. Then confirm the merge and
get the merge commit:
gt pr view <n> -q '.merged, .merge_commit_sha'gh pr view <n> --json state,mergeCommit -q '.state, .mergeCommit.oid'Right after each merge, before the next PR. Run this step on its own when the user merged a PR themselves and asks you to carry on: a merged PR whose issues still show open boxes is the gap this step closes.
#<n>,
<owner>/<repo>#<n> and issue URLs, after Closes, Fixes, Resolves (any tense), Refs,
Part of or a plain mention. None means skip this step.gt api repos/<owner>/<repo>/issues/<n>; GitHub:
gh issue view <n> --repo <owner>/<repo> --json body,state) and its comments, which may say
what changed since the body was written.- [ ] item, check the PR's diff, not its title. Tick
it only when the merged change does all of it. Leave it unticked when the PR did part of it,
or it also needs something the merge doesn't do (a deploy, a live check, someone's decision).
Change only the boxes and keep the rest of the body as it was:
gt api -X PATCH repos/<owner>/<repo>/issues/<n> --input body.json with {"body": ...}gh issue edit <n> --repo <owner>/<repo> --body-file body.mdgt issue comment <n> --repo <owner>/<repo> --body-file f, gh issue comment ... -F f).Closes #<n> closes the issue on merge, open boxes or not. If boxes are
still open after step 3, reopen it and list them in the comment. If a PR that only referred to
an issue left it with every box ticked, don't close it yourself: say in the report that it looks
done and ask.Issues in another repository follow the same rules; skip any you can't edit and say so.
Skip this step after the last PR.
/ship-it:verify-it. Then
git fetch origin and look for commits on the base branch after the merge commit
(git log --oneline <merge-sha>..origin/<base>). If the project lists automated commits to
expect and they haven't landed yet, re-run the watch once on the newest base-branch commit,
then look again. Don't continue while one is still expected.gt pr edit <child> --base <new-base>gh pr edit <child> --base <new-base>git fetch origin
git rebase --onto origin/<new-base> <old-parent-head-sha> <child-branch>
git push --force-with-lease origin <child-branch>
This force-pushes, so ask first unless the user or the project's section already allows it.
Plain merge commits need no rebase.For each PR in order: merged (with merge commit and method) or stopped (and why), plus which
approval rule applied, if any. For each issue Step 5 touched: the items ticked, the items left
open, and whether it was reopened or looks ready to close. Hand the last merge commit, and its CI result if you watched it, to
/ship-it:sync-it.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rootiest/rootiest-ai --plugin ship-it8 skills in this plugin
/deploy-itDeploys what is on the default branch using the project's own deploy steps, with user approval unless the project's rules allow deploying without it, then verifies the deploy. Reports cleanly when there is nothing to deploy./doc-itSyncs the project's documentation (docs/, wiki, or README) with the code changed since the last docs update, and audits the changed code for errors before it ships./prune-itSyncs the default branch and deletes local and remote branches that are already merged or whose remote branch is gone./push-itBranches, commits (Conventional Commits), tests, pushes, and opens a PR for uncommitted or staged work. Handles both independent and stacked PRs./ship-itShips pending work end to end - syncs docs and audits code, opens a PR, waits for CI, merges with approval, syncs main, prunes merged branches, and deploys./sync-itAfter a PR merges, waits for CI on the merge commit and fast-forwards local main, pulling in any automated post-merge commits.Other plugins' skills for the same job