Rebase from main, commit all changes, push, and open a pull request. Usage: /ship [commit message]
Current branch:
!git branch --show-current
Git status:
!git status --short
Recent commits on this branch (not on main):
!git log --oneline origin/main..HEAD 2>/dev/null || echo "(no commits ahead of main)"
Staged + unstaged diff summary:
!git diff --stat HEAD 2>/dev/null
Execute these steps in order. Stop and report to the user if any step fails unexpectedly.
main, tell the user to create a branch first and stop.git fetch origin main
git rebase origin/main
git status and git diff to understand what changed.git add <file> — avoid git add -A to prevent accidentally committing secrets or build artifacts). Never stage .env* files.$ARGUMENTS was provided, use it as the commit message.feat:, fix:, docs:, refactor:). Show it to the user for confirmation before committing.Co-Authored-By: Claude Opus 4.6 <[email protected]>
git commit -m.git push -u origin <branch-name>
--force-with-lease. Never use --force.gh pr view --json url 2>/dev/nullgh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-4 bullet points covering all commits>
## Test plan
<Checklist of what to verify>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Output the PR URL and a one-line summary of what was shipped.