/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.
/ship, your change goes through these steps:
- Pull request:
/shipcan commit your work, push your branch, and open the pull request as you - Review: Claude reviews your change with
/code-review - 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
- 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
Prerequisites for /ship and /steward
Install or update these tools:- Claude Code v2.1.330 or later. If
/shipis 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
- 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,/shipopens 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:/shipcan commit all your uncommitted changes, new files included. In your shell, rungit status. Delete each new file that you donât want in the pull request, or stash the file withgit stash push -u -- <file> - No secrets in those files, for
/ship:/shiplooks for secrets by file name, such as.env, so look inside your files yourself. A deny rule such asRead(./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
acceptEditsmode, Claude waits at each prompt. InbypassPermissionsmode, no watch starts. With v2.1.331 or later,/shipdoesnât start in plan mode
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./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:
/shipdoesnâ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,/shipdoesnât commit or push anything. See /ship committed or pushed nothing - Your own pull request is already open for the branch:
/shipcan 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,/shipdoesnât commit or push here - The repository is public:
/shipdoesnât commit your uncommitted changes. If youâre on a branch other than the default branch and it has commits of its own,/shippushes those and opens a pull request without your uncommitted changes. Otherwise, commit your work on a branch other than the default branch, then run/shipagain - Your commits are on the default branch, with nothing uncommitted: in a repository that isnât public,
/shipmakes a new branch for them, pushes that branch, opens a pull request, and switches your checkout to the new branch. Before v2.1.331,/shippushes nothing, so put the commits on a branch other than the default branch, then run/shipagain
/ship, if you want any of these:
- A draft pull request
- Another base branch
- Your repositoryâs pull request template
- A pull request on GitHub Enterprise or from a fork
/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
/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:
/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
/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 inGET 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:
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>.gitin your shell, with that remoteâs name in place oforigin. Then check thatgit remote -vshows nohttpsaddress on its(fetch)line - Add the host to
sandbox.network.deniedDomains. Theabout to readnotice 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
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 withgit push -uorgit 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, andgit 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:
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 installline 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 startsStopped 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 blocksgh 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.
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 underskillOverrides in managed settings. ship-local is the skill behind /ship.
This example turns off both:
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.
Related resources
- Troubleshoot
/shipand/steward: messages that the commands print, and what to do - Review code locally: the review that
/shipruns - Permission modes: auto mode and the other permission modes