Learn / Claude Ship's rules for agent PRs
Claude Ship's rules for agent PRs, as gates your agent can't skip
5 min read · For developers letting Claude Code and other agents work on their pull requests
TL;DR: On November 25, 2026 Addy Osmani published a practical guide to shipping with Claude Code, alongside the launch of Claude Ship. Under the product, it is a set of habits the Claude Code team uses: review before you push, stop after three failed rounds, write a rule only after a comment repeats, verify before you claim, and keep rule files under a person's eye. Habits written in a prompt can be skipped. ThumbGate turns the ones that happen at the tool call into hooks that block.
What Claude Ship is
From the guide, Claude Ship is three agents for the work after a PR is opened:
- Code Review reviews the PR through several lenses, checks its own findings and posts them. Generally available.
- PR Steward (beta) keeps a PR green: failing checks, merge conflicts, review feedback. It comments after every push with what it changed and how to undo it, and it is designed not to approve or merge.
- Claude Approvals (beta) applies an approval policy the team writes in
.claude/approvals.yml, starting in an observe mode that logs what it would have decided.
For one developer, /code-review, /ship and /steward run the same ideas in a local Claude Code session.
The rules worth keeping, with or without Claude Ship
- Three strikes. During a watch Claude pushes at most three times for one issue, then reports the attempts. If a check keeps failing after three rounds, the approach is probably wrong.
- A rule needs two repeats. A review comment becomes a written rule only after it shows up on at least two PRs, and a person approves the PR that adds it. Delete rules that stop paying off.
- Repeat setup becomes a verify skill. Write down how to boot and exercise the app, and end with "Don't report success without" the steps you ran.
- Repeat maintenance becomes steward rules. Known flaky checks, how to regenerate the lockfile, what to leave to the author.
- Observe before you enforce. Run a policy in a mode that only logs, compare it with what reviewers did, then turn it on.
- Rule files need a person. The watch never commits
CLAUDE.md, REVIEW.md, .claude/ or .github/. Anyone who can merge can change the rules, so review those changes like CI changes.
- The person who called the agent owns the change. As if they typed it themselves.
Where a prompt rule stops working
Rules one, three and five are about what the agent does next, in the middle of a long session. That is where written instructions are weakest: after a context compaction, or on the fourth try at a red test, the agent is reasoning about the failure, not about your house rules. A hook runs on every tool call whether the agent remembers the rule or not.
How ThumbGate enforces them
- Three strikes.
scripts/three-strikes-gate.js records each Bash result. After the same command fails three times in a row within 30 minutes, the fourth identical try is denied with the recent errors and a prompt to change the approach or report the attempts. A narrower command, such as only the failing test, is still allowed. Read-only probes like grep never count.
- Warn before block. A thumbs-down becomes a rule that warns on the first capture and blocks at three repeats, or at two thumbs-downs from a person on the same command. That is observe-then-enforce at the level of a single rule.
- Proof before claim. The anti-claim gates deny "done", "deployed" or "verified" when nothing in the current turn proves it, the same contract as a verify skill's last line.
- Rule files stay with a person. On our own repository, changes to the ship policy, hooks and workflows are labelled for the owner and never auto-merge.
Turn on the PR gates with THUMBGATE_PR_DISCIPLINE=1. The wiring is in the anti-babysitting gates guide. Every gate fails open on an internal error.
What ThumbGate does not do
- It does not review code or approve PRs. Use Code Review, CodeRabbit or a person for that.
- It does not merge anything. Branch protection and your approval policy decide that.
- The three-strikes gate compares commands, not intent. Two different commands that chase the same bug are two separate streaks.
Sources
ThumbGate is an independent project and is not affiliated with or endorsed by Anthropic.
Make your agent stop at strike three
Install ThumbGate, then turn on the PR gates.
npx thumbgate init