| name | ship |
| description | Commit, push, and optionally create or update a PR for the current staged changes. Use when the user asks to "ship", "ship it", "ship changes", "commit push and PR", or "ship this". |
Ship
Commit, push, and optionally create or update a PR for the current staged changes.
Task Tracking
At the start, use TaskCreate to create a task for each phase:
- Determine intent
- Branch (if needed)
- Stage unstaged changes
- Run
/commit-rules skill
- Commit
- Push (if requested)
- Create or update PR (if requested)
Step 1: Determine Intent
Detect the repository state:
- Default branch:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
- Current branch name, and whether it tracks an upstream
- Whether a PR already exists for the current branch (
gh pr view)
Sample the prevailing workflow from recent default-branch history (git log --first-parent origin/<default-branch> -n 30 --pretty=%s): judge whether changes mostly land through pull requests (merge-PR commits or (#N)-suffixed squash commits) or are committed directly to the default branch.
Output a one-line summary of the detected state as text. Then use AskUserQuestion to choose how to proceed, offering these options:
- Commit, push, and create/update the PR — say "create a PR" when no PR exists for the current branch and "update the PR" when one does; on the default branch, Step 2 creates a feature branch first
- Commit and push — commit, then push to the current branch's remote
- Commit only — commit the staged changes, do not push
Recommend the option that fits this repo by listing it first and labeling it : when the current branch already has a PR, recommend updating it; otherwise follow the prevailing workflow — recommend the PR path for a PR-based history, or commit and push for a direct-commit history.