Opens a GitHub pull request from the current branch to main. USE FOR: creating a PR after finishing feature work; merging a branch to main via pull request; submitting work for review. Stops with an error if already on main. Auto-fills PR title and description from branch name and recent commits.
Create a GitHub pull request merging the current branch into main, using the branch name and commit history to auto-generate a meaningful title and description.
Run git branch --show-current (or git rev-parse --abbrev-ref HEAD) to get the active branch name.
main (or master): stop immediately and tell the user:
"You are currently on the
mainbranch. A pull request cannot be created frommaintomain. Please check out a feature branch first."
Run these commands in parallel to collect signal for the PR title and description:
git log main..HEAD --oneline — list of commits on this branch not yet in maingit log main..HEAD --format="%s%n%b" | head -80 — commit subjects + bodies for richer contexttask.md (if it exists) for a feature title and goal summaryTitle: Derive from the branch name (convert kebab-case or snake_case to Title Case, strip ticket prefixes like feature/ or bugfix/). If the commit list clearly points to a single purpose, sharpen the title from the commit messages.
Description (Markdown body):
## Goal section, use it as the opening sentence or to frame the paragraphIf the user supplied extra context as skill arguments, incorporate it in both the title and description.
Run git remote get-url origin and extract <owner>/<repo> (strip the .git suffix and any https://github.com/ prefix).
Construct the GitHub compare URL in this format: