Skip to main content
/ship is a Claude Code command that opens a GitHub pull request for your change if your branch doesn’t have one. Claude reviews your change and works on feedback and failing checks to help get it ready to merge. If your pull request is already open and you don’t want a review, type /steward. It skips the review, and Claude does the same work on feedback and failing checks.
Run either command from the Claude Code CLI in a terminal, in your local clone of the repository. Cloud sessions don’t have them.
After you type /ship, your change goes through these steps: Diagram of what happens after you type /ship. In your session, Claude Code opens a pull request and reviews it with /code-review. Then the watch starts: Claude pushes fixes to your branch and responds to checks, comments, and conflicts. When the pull request is ready, you merge it. Diagram of what happens after you type /ship. In your session, Claude Code opens a pull request and reviews it with /code-review. Then the watch starts: Claude pushes fixes to your branch and responds to checks, comments, and conflicts. When the pull request is ready, you merge it.
  1. Pull request: /ship can commit your work, push your branch, and open the pull request as you
  2. Review: Claude reviews your change with /code-review
  3. Watch: Claude keeps checking the pull request from your Claude Code session. It works on failing checks, merge conflicts, reviewers’ comments, and the findings from its review, and pushes fixes. This ongoing work is called a watch
  4. Merge: once the pull request is ready, merge it yourself
/steward skips steps 1 and 2 and starts the watch.

When to use /ship and /steward

With either command, Claude works on your pull request’s feedback and failing checks. Choose between /ship and /steward by where your change is:
  • /ship: your change is finished, and you want Claude to review it and then work on the feedback and failing checks that follow
  • /steward: your pull request is already open and you don’t want a review first, or a watch ended and you want to start it again
Both commands run in your session, so their work counts against your usage. If you want something else, such as a review alone or fixes from a cloud session, use one of these:

Prerequisites for /ship and /steward

Install or update these tools:
  • Claude Code v2.1.330 or later. If /ship is missing, see /ship isn’t available in your session
  • For a repository on GitHub, the GitHub CLI 2.63 or later, signed in with gh auth login. With an older version, no watch starts. Before v2.1.331, a watch starts and Claude can’t push fixes
  • git 2.38 or later, to merge new commits into your branch. With an older git, Claude leaves those merges to you, and no watch starts on another host
Then get your change and your session ready:
  • A finished change, for /ship: have it in your local clone of a repository on GitHub. It can be uncommitted, committed on a branch other than the default branch, or already in an open pull request of yours. If the repository is hosted somewhere other than GitHub, /ship opens no pull request. Claude reviews your change, and can then watch your branch. Before v2.1.331, no watch starts there
  • Only the files that you want in the pull request, for /ship: /ship can commit all your uncommitted changes, new files included. In your shell, run git status. Delete each new file that you don’t want in the pull request, or stash the file with git stash push -u -- <file>
  • No secrets in those files, for /ship: /ship looks for secrets by file name, such as .env, so look inside your files yourself. A deny rule such as Read(./notes.txt) doesn’t keep a file out of the commit
  • An open pull request on GitHub, for /steward: it has to be your own, with its branch checked out in your local clone. On a host other than GitHub, see Watch a branch on another host
  • Permission mode: choose auto mode if you want Claude to work on the pull request unattended. In Manual mode and acceptEdits mode, Claude waits at each prompt. In bypassPermissions mode, no watch starts. With v2.1.331 or later, /ship doesn’t start in plan mode
On native Windows, no watch starts. In a background session, no watch starts either. Before v2.1.331, one can start there.
Run a watch only where you trust everyone who can merge to the base branch or push to your branch. Any of them can run programs on your computer with your credentials.

Run /ship or /steward

In a terminal, open Claude Code in your clone, then type /ship or /steward at the prompt. Both take arguments, such as a pull request’s number.

Run /ship on a finished change

If you made the change with Claude, use that same session, because Claude writes the commit message from the session’s conversation. Anyone who can see the pull request can read that message.
/ship proceeds with no confirmation prompt. After you press Enter, it can commit your work, push your branch, and open the pull request as you. Before the commit, and again before the push, a line that ends Esc to cancel says what’s about to happen. If you do nothing, /ship continues after a few seconds.
If you cancel before the push, a commit that /ship made stays. To undo it and keep your files, run git reset HEAD~1 in your shell.

What /ship commits and pushes

In a repository on github.com that isn’t a fork, /ship can commit your uncommitted changes, push the branch, and open the pull request before the review. On the default branch, it commits on a new branch and switches your checkout to that branch. If your work is already committed on another branch, /ship pushes that branch and opens the pull request. /ship does something else in these cases. Take the first one that fits:
  • Someone else’s pull request is open for the branch: /ship doesn’t commit or push your work, and no watch starts
  • An uncommitted file’s name suggests a secret, such as .env: in a repository that isn’t public, /ship doesn’t commit or push anything. See /ship committed or pushed nothing
  • Your own pull request is already open for the branch: /ship can commit your uncommitted changes, then push them and your unpushed commits onto it. In some cases, such as a public repository or auto-merge turned on, it doesn’t commit your changes. If a watch then starts, your unpushed commits can go up with Claude’s next push. Before v2.1.331, /ship doesn’t commit or push here
  • The repository is public: /ship doesn’t commit your uncommitted changes. If you’re on a branch other than the default branch and it has commits of its own, /ship pushes those and opens a pull request without your uncommitted changes. Otherwise, commit your work on a branch other than the default branch, then run /ship again
  • Your commits are on the default branch, with nothing uncommitted: in a repository that isn’t public, /ship makes a new branch for them, pushes that branch, opens a pull request, and switches your checkout to the new branch. Before v2.1.331, /ship pushes nothing, so put the commits on a branch other than the default branch, then run /ship again
Open the pull request yourself, then run /ship, if you want any of these: If /ship commits or pushes nothing and these cases don’t say why, see /ship committed or pushed nothing.

Start a watch with /steward

To start a watch with no review first, type /steward at the Claude Code prompt. Use it on your own open pull request, or to start again after a watch ends. Before you leave a watch alone, see Code that a watch runs on your computer. /steward is separate from PR Steward, the agent that an organization sets up. Where PR Steward is already working on your pull request, no watch starts.

What Claude does during a watch

A watch is Claude’s ongoing work on your pull request, which starts after /ship’s review or when you type /steward. On a host other than GitHub, see Watch a branch on another host. Claude uses your gh and git sign-ins, so its work on GitHub appears under your name. In auto mode, on a GitHub pull request, Claude takes these actions without asking:
  • Works on the review findings that it judges to be problems
  • Can post one comment that sums up its review
  • Pushes commits to your branch
  • Merges the base branch into yours, to resolve conflicts or bring your branch up to date
  • Works on failing checks, and re-runs failed ones
  • Answers review comments, resolves threads, and re-requests reviews
On GitHub, Claude reads comments from you and from people with write access. On github.com, it also reads comments from Claude’s bot. To have Claude read another bot’s comments, type /steward + and the bot’s name, as in /steward +my-lint-bot. When checks pass and comments are answered, Claude says so in the session. Merge the pull request yourself. What can merge depends on your permissions and your repository’s branch rules. See When a watch can lead to a merge.

Watch a branch on another host

On a host other than GitHub, such as GitLab, Bitbucket, or Azure DevOps, Claude can watch your branch for up to seven days. The watch needs git 2.38 or later, and works without the GitHub CLI. /ship and /steward don’t commit, push, or open anything when they start. Before v2.1.331, /ship reviews your change there, and no watch starts. Commit your change first, then push your branch with an upstream from your shell:
On gitlab.com, bitbucket.org, or dev.azure.com, open your merge request or pull request next. Claude Code can then read its checks and comments with your git sign-in. Then type /ship at the Claude Code prompt, or /steward for a watch with no review first. With your git sign-in, Claude can take actions such as these, in auto mode without asking:
  • Merge the base branch into yours to resolve a conflict
  • Merge in other people’s pushes to your branch
  • Push commits to your branch
The watch gives Claude no command to reply to comments, re-run a check, or read CI logs there. To see what Claude may do there, type /ship terms at the prompt while the watch runs.

Checks and comments on GitLab, Bitbucket, and Azure DevOps

In a terminal session, Claude Code can read details such as your open merge request or pull request, its checks, and its comments. To do so, it asks git for the sign-in that git keeps for the remote that your branch pushes to. That sign-in goes to the API of gitlab.com, bitbucket.org, or dev.azure.com in GET requests. You aren’t asked first. A line such as this one appears before the first read, which can go out as soon as you run /ship or /steward:
A watch that reads the host repeats these reads until it ends. To see whether they apply to your checkout, run git remote -v in your shell. They can happen only when the (fetch) line of the remote that your branch pushes to shows an https address on one of those hosts. To prevent them, switch the remote to SSH or deny the host in your settings before you run /ship or /steward. If a watch is running, type /ship stop first:
  • Have the remote that your branch pushes to fetch over SSH, as in git remote set-url origin git@gitlab.com:<group>/<project>.git in your shell, with that remote’s name in place of origin. Then check that git remote -v shows no https address on its (fetch) line
  • Add the host to sandbox.network.deniedDomains. The about to read notice still appears, but Claude Code doesn’t ask git for the sign-in or call the web API. The watch’s own git commands, which Claude Code runs outside the sandbox, still contact the host with git’s sign-in. With the sandbox on, Claude also can’t fetch from or push to that host
At the watch’s start, the host can refuse the sign-in, or show no open merge request or pull request of yours for the branch. The watch can then go on with git alone, and the lines at its start include Claude can't see checks or comments on gitlab.com, so watch those yourself. If you close yours without merging it, that watch continues, so type /ship stop.

Keep working while a watch runs

While a watch runs, keep the session open, the computer awake, and your pull request’s branch checked out. Before v2.1.331, also keep the session in the foreground. Claude edits files in the same checkout as you.
  • To start your next change: work in another folder, such as a second clone of the repository, and open another Claude Code session there
  • To push your own commits: name the remote and branch, as in git push origin <branch>. If you change git’s settings, for example with git push -u or git branch -u, the watch ends
  • Commits that you haven’t pushed: they can go up with Claude’s next push
  • Your uncommitted work: Claude can edit a file that you’re working on, and can commit it. When Claude acts without a message from you, Claude Code refuses these commands from Claude: git stash, git reset, git checkout, git add -A, and git commit -a

Ask Claude to check with you first

To see /ship’s review findings or a reviewer’s comment before Claude acts on them, say so in a message at the Claude Code prompt. To see the findings before Claude fixes anything, send the message while the review is running. This example asks Claude to show you its findings, and to ask before it pushes or replies:
That message is a request to Claude, and Claude Code doesn’t enforce it.

Save instructions for watches in a repository

To tell Claude how to look after pull requests in a repository, save a file at .claude/skills/steward/SKILL.md in the repository’s top folder. PR Steward reads the same file, so one file can serve both, and that section has an example. During a watch, Claude reads the copy in your checkout and follows it as instructions, for example on which checks matter and how to run the tests, within these limits:
  • Installs and downloads: Claude can skip a line that installs or downloads something, such as the npm install line in that example
  • Blocked commands: the file doesn’t change what Claude Code blocks during a watch
  • Changes to the file: if you add or edit it yourself while a watch runs, the watch ends. For whose other changes can reach it, see Code that a watch runs on your computer

Check, stop, or restart a watch

A watch is Claude’s ongoing work on your pull request, which starts after /ship’s review or when you type /steward. It runs in your session, so you check it and stop it at the Claude Code prompt.

Check whether a watch is running

Type /tasks at the Claude Code prompt. Once the review is done and while Claude isn’t working, a running watch appears in the list as a scheduled task whose name starts with /steward --tend.

What ends a watch

After a watch ends, look for a line that starts Stopped watching. A watch stopped lists reasons that it gives. The watch ends in cases such as these:

Stop or restart a watch

To end a watch, type /ship stop at the Claude Code prompt in the session that runs it. If Claude is working when you type it, the watch ends when the current turn does, so what Claude pushes or posts in that turn still reaches the pull request. To stop the turn as well, press Esc. To start a watch again, type /steward. On a host other than GitHub, add any base that you named, as in /steward origin/main.

Decide where to run a watch

A watch is Claude’s ongoing work on your pull request, which starts after /ship’s review or when you type /steward. Claude works with your gh and git sign-ins. Before you leave a watch alone, check what Claude Code blocks, which code can run on your computer, and what can still lead to a merge.

What Claude Code blocks during a watch

When Claude acts without a message from you, Claude Code blocks gh and git commands that merge the pull request, approve it, turn on auto-merge, or force-push. At those times, Claude Code also limits Claude’s gh and git commands to a short list, and refuses tools that the watch doesn’t need, such as connectors, WebFetch, and WebSearch. To see these limits in Claude Code, type /ship terms at the prompt.
The limits on a watch don’t cover everything. The watch uses your gh and git sign-ins, so it could merge a pull request that your repository’s branch rules let you merge without another person’s approval. See When a watch can lead to a merge. A setting in your session, such as a permission rule or a hook, can let commands past the limits.

Code that a watch runs on your computer

Code from each of these sources can run on your computer during a watch, with your credentials: If Claude Code sees that a merge of the base branch or of other people’s pushes would change its settings, .mcp.json, or git’s config files, Claude leaves that merge to you.

When a watch can lead to a merge

Cases such as these can lead to a merge:

Permission rules and hooks that apply to /ship and /steward

Claude Code runs /ship’s own commit, push, and pull request commands itself, outside the sandbox. During a watch, when Claude acts without a message from you, it writes its git fetches, merges, commits, and pushes in the form git -c core.hooksPath=/dev/null push. Rules and hooks apply this way, whether they’re in your own settings or in managed settings:

Turn off /ship and /steward for your organization

To turn off both commands, set these keys under skillOverrides in managed settings. ship-local is the skill behind /ship. This example turns off both:
You can also set CLAUDE_CODE_DISABLE_SHIP to 1, for example under env in managed settings. Requires Claude Code v2.1.331 or later. To stop /ship’s own pushes, put a deny rule such as Bash(git push *) in managed settings. With that rule, no watch starts.

Arguments for /ship and /steward

Type an argument after /ship or /steward at the Claude Code prompt. To combine arguments, put the effort level first, as in /ship low 41 +my-lint-bot.