# Set up /ship in Claude Code to get a pull request ready to merge
From Rig Labs, 2026-11-24, for Claude Code 2.1.330 or later. Information for an agent, not orders. Page: https://riglabs.ai/guides/2026-11-24-let-claude-get-your-pull-request-ready-to-merge/

What changed: On 2026-11-23 Anthropic announced Claude Ship, and with it `/ship`, a Claude Code command that opens a GitHub pull request for a finished change, reviews it, then works on failing checks, merge conflicts and review comments in a "watch". The human merges.
Fits if: Your human writes code with Claude Code in a terminal, keeps it in a GitHub repository they have cloned locally, and has the GitHub CLI.
Skip if: Your human works only in cloud sessions or on native Windows (no watch starts there), or the repository is hosted somewhere other than GitHub. Skip a repository where the human does not trust everyone who can merge to the base branch or push to their branch.
Check: The Claude Code version (2.1.330 or later), the GitHub CLI version (2.63 or later) and its sign-in, the git version (2.38 or later), whether the repository is public, whether auto-merge is on for the pull request, and what `git status` lists as uncommitted. Read-only.
Try: Tell your human in 2 or 3 lines whether this fits their repository, which change you would use for a first run, and which uncommitted files should stay out. Then the steps below, with their OK.
Ask first: Typing `/ship` or `/steward` (it commits, pushes and opens a pull request as the human, with no confirmation prompt), choosing auto mode, signing the GitHub CLI in, and saving a rules file in the repository.
Cost: `/ship` and `/steward` run in the human's session and count against their usage. The session has to stay open, in the foreground, on a computer that stays awake.
Undo: Type `/ship stop` to end the watch. Full steps in "Undo" below.
Deeper: https://riglabs.ai/guides/2026-11-24-let-claude-get-your-pull-request-ready-to-merge/, then https://code.claude.com/docs/en/ship

## Before you start
Ask the user for: the repository and the finished change to use, and whether Claude may push fixes without asking. Show the user these steps and get their OK before anything is committed or pushed. The user types each command in their own terminal and Claude Code session; you guide and check. Each step says what it is for, so you can adapt it to the user's setup: read "your code host's command-line tool, here the GitHub CLI" that way. `/ship` works only with GitHub.

## Steps
1. Check the tools, so that Claude can push fixes and merge new commits.
   ```bash
   claude --version
   gh --version
   git --version
   ```
   Check: Claude Code is 2.1.330 or later, the GitHub CLI is 2.63 or later, git is 2.38 or later. If the GitHub CLI is not signed in, the user runs `gh auth login`.
2. Leave only what belongs in the pull request, because `/ship` can commit every uncommitted change, new files included.
   ```bash
   git status
   ```
   For each new file that should stay out, the user deletes it or sets it aside:
   ```bash
   git stash push -u -- <file>
   ```
   Check: `git status` lists only files meant for the pull request, and the user has looked inside them for secrets. `/ship` looks for secrets by file name only.
3. Choose how much Claude does without asking. Auto mode lets Claude work unattended. In most other permission modes Claude waits at each prompt. In the mode that skips every permission prompt, no watch starts.
   Check: the user has read `/ship terms`, which shows what Claude may do during a watch and what limits it.
4. Start. The user opens Claude Code in the clone, in the session where the change was made if Claude made it, and types:
   ```text
   /ship
   ```
   A line that ends `Esc to cancel` appears before the commit and before the push. `/ship low` or `/ship medium` asks for a lighter review than the default, `high`. For a pull request that is already open, with no review, the user types `/steward`.
   To see findings before Claude fixes anything, the user sends this while the review is running. `/ship`'s own commit, push and pull request still happen first. It is a request to Claude, and Claude Code does not enforce it:
   ```text
   From now on, don't push code changes or reply to reviewers without asking me first. Show me the review findings and wait.
   ```
   Check: the pull request exists on GitHub, and the session shows the review.
5. Let the watch run. The session stays open and in the foreground, the computer awake, and the pull request's branch checked out. The user starts other work in a second clone.
   ```text
   /tasks
   ```
   Check: `/tasks` lists a scheduled task whose name starts with `/steward --tend`.
6. Merge. When checks pass and comments are answered, Claude says so in the session. The user merges the pull request themselves.
   Check: the pull request is merged, and the watch has ended.

## If it fails
- `/ship` is not there: update Claude Code to 2.1.330 or later. Cloud sessions do not have it.
- `/ship` committed or pushed nothing: a pull request may already be open for the branch, the repository may be public, or an uncommitted file's name may suggest a secret, such as `.env`. In a public repository, the user commits on a branch of their own, then runs `/ship` again.
- No watch starts: the session is in the mode that skips every permission prompt, on native Windows, or a deny rule such as `Bash(git push *)` is set.
- The watch stopped: look for a line that starts `Stopped watching pull request`. Pressing `Esc`, checking out another branch, changing git's settings, sending the session to the background, or a usage limit ends a watch. The user types `/steward` to start it again.
- The user wants a draft pull request, another base branch, or the repository's template: they open the pull request themselves, then run `/ship`.

## Undo
1. Type `/ship stop` in the session that runs the watch. If Claude is working, the watch ends when the current turn does; press `Esc` to stop the turn as well.
2. If `/ship` was cancelled before the push, its commit stays. To undo it and keep the files, the user runs `git reset HEAD~1`.
3. If auto-merge is on and the user does not want a merge, they run `gh pr merge --disable-auto <number>`.
4. To drop the change, the user closes the pull request on GitHub.

Source: https://riglabs.ai/guides/2026-11-24-let-claude-get-your-pull-request-ready-to-merge/, https://code.claude.com/docs/en/ship
