| name | ship |
| description | Push branch, create PR with automerge, and watch until merged. Only use when explicitly asked to "ship" or invoked via /ship. Do NOT trigger on generic phrases like "push", "merge", or "land". |
Ship
Push the current branch, create a squash-merge PR, enable automerge, and watch CI until it merges. Fix any issues that arise.
Prerequisites
- Current branch is NOT main (must be on a feature/fix branch)
- All changes are committed (no uncommitted work)
gh CLI is authenticated
Steps
-
Validate state
git status -s
git branch --show-current
If on main, abort with a message. If there are uncommitted changes, warn the user.
-
Push branch
git push -u origin HEAD
-
Create PR
-
Enable automerge
gh pr merge <number> --auto --squash
-
Watch until merged
Use gh run watch to monitor the CI run triggered by the PR:
gh run watch $(gh run list --branch $(git branch --show-current) --limit 1 --json databaseId --jq '.[0].databaseId')
This blocks until the run completes — no polling needed.
-
Verify merge
gh pr view <number> --json state,mergedAt
Confirm the PR state is MERGED.
-
Handle failures
If CI fails:
- Read the failing check logs:
gh run view <run-id> --log-failed
- Diagnose and fix the issue
- Commit the fix, push, and return to step 5 (watch the new run)
- Repeat until CI passes and the PR merges
Output
Report the PR URL and final merge status when done.