Create a GitHub pull request from the current branch.
Steps
- •Run
git branch --show-currentto get the source branch - •Run
git log main..HEAD --onelineto see all commits being PR'd - •Run
git diff main...HEAD --statto see changed files summary - •If there are unpushed commits, push the branch with
git push -u origin HEAD - •If $ARGUMENTS is provided, use it as the PR title
- •Otherwise, draft a title from the commits (keep under 70 chars)
- •Generate a PR body with:
- •
## Summary— 1-3 bullet points - •
## Test plan— checklist of testing steps - •Footer:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- •
- •Create the PR:
gh pr create --title "..." --body "..." - •Output the PR URL
Rules
- •Default base branch:
main - •NEVER force push
- •If the branch has no commits ahead of main, abort and explain