| name | gh-pr |
| description | Create a GitHub pull request for the current branch |
| disable-model-invocation | true |
| argument-hint | [title] (optional — auto-generates if omitted) |
Create a GitHub pull request from the current branch.
Steps
- Run
git branch --show-current to get the source branch
- Run
git log main..HEAD --oneline to see all commits being PR'd
- Run
git diff main...HEAD --stat to 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