Claude Can Now Keep an Eye on PRs for You, but First Be Aware of These Pitfalls
Addy Osmani publicly shared the Claude Code team's post-PR workflow: /code-review checks first, /ship opens a PR and watches it for seven days, and /steward takes over old PRs. Automation saves context switching, but responsibility still rests with people. The article lists permissions, costs, and several easy-to-trip-over boundaries.
Miguel Ángel Durán recommended Anthropic's official guide on X about how to use Claude Code to get code into production. The guide's author is Addy Osmani from the Claude Code team. The original link is here, and Miguel's recommendation tweet is here.
The article opens by pointing out a commonly overlooked fact: opening a PR is not the tiring part; what comes after is. Failing CI, review comments, and conflicts with the main branch are each small things, but they all pull people away from the task at hand. Claude Ship is meant to take over this stretch.
Claude Ship is made up of three agents: Code Review, PR Steward (beta), and Claude Approvals (beta). Code Review reviews PRs from multiple perspectives, collects issues, performs adversarial validation, categorizes them, and posts them to the PR. PR Steward is responsible for keeping PRs green, handling failing CI, conflicts, and review feedback, but it does not approve or merge. Claude Approvals reads the approval policy file in the repository, like a smarter CODEOWNERS, and decides according to the rules whether Claude can approve routine changes or whether a human must.
Run /code-review locally first. Addy's advice is direct: if you do only one thing, review your own branch before pushing. The command can take high, --fix, --comment, and ultra. ultra runs in the cloud, requires logging in to claude.ai, and may be billed separately. Changes made by --fix during background review may not be recoverable with /rewind, so it is safer to commit first. Local /code-review reads CLAUDE.md, not REVIEW.md.
Then use /ship. When there is no PR, it commits pending changes, behaving similarly to git add -A, respects .gitignore, creates a branch, writes the commit message using the current session, pushes and creates a PR, then runs review and fixes issues it considers valid, and finally watches the PR for up to seven days. It will not commit files whose names look like secrets, and it will not commit rule files such as CLAUDE.md, REVIEW.md, .claude/, and .github/; these must be committed manually. In public repositories, it will not commit changes on your behalf. Run git status before starting.
/ship's watch runs on your local machine, uses your quota and API bill, and stops when you close the laptop. On Windows, /ship can open a PR and review, but watch does not start. Watch merges the base branch into your branch and then runs tests and other commands. In other words, anyone who can merge code into the base branch has an opportunity during watch to run commands on your machine. Addy wrote: run watch locally only in repositories where you trust everyone who can merge into the base branch.
Existing PRs can use /steward. It only runs the watch portion of /ship, without reviewing first. It is suitable for PRs with red CI or conflict loops, not for PRs still in design debate. Once rules repeat, write them into files: repeated review comments go into CLAUDE.md or REVIEW.md, repeated startup steps go into .claude/skills/verify/SKILL.md, and repeated PR maintenance goes into .claude/skills/steward/SKILL.md. Addy's team standard is to consider writing a rule only after the same pattern has repeated in at least 2 PRs, and rule PRs are approved by humans.
When rolling this out to a team, first have admins protect the default branch, enable Code Review, enable PR Steward in Manual mode, and write an approval policy in observe mode. Observe for one or two weeks, look back at merged PRs, compare Claude's judgments and review behavior, and then decide whether to remove observe. In the approval policy, paths such as auth, billing, and .github can require approval from a human other than the author, with Claude only commenting. Claude's approvals count as real approvals on GitHub; when reading the policy, read it together with branch protection.
Finally, Addy makes responsibility explicit: the person invoking the agent is responsible for the changes, just like code they typed themselves. Claude Ship and local commands will miss bugs, security issues, and other problems; do not remove existing tests, scanners, or reviews. Some commenters raised cost concerns, and others warned about watch's permission boundaries. Tools can save context switching, but they cannot save judgment.
发布时间: 2026-11-27 01:28