From gh-pr-tools
Create a GitHub pull request from the current branch with auto-generated title and description. Use when the user wants to create a PR, open a pull request, or submit changes for review.
npx claudepluginhub shouenlee/ghcp-dev-plugin --plugin gh-pr-toolsThis skill uses the workspace's default tool permissions.
Create a GitHub pull request from the current branch with an auto-generated title and description based on commit history.
Creates GitHub pull requests from current branch using repo templates, conventional commit titles, issue linking from commits/branch, and gh CLI. Invoke with $create-pr after implementation.
Creates draft pull requests via GitHub CLI: gathers git context with status/logs/diffs, generates conventional commit titles, formats markdown bodies. Triggers on PR creation phrases.
Creates GitHub Pull Requests using GitHub CLI: detects existing PRs for branches, pushes changes, generates titles/bodies from commits. Handles monorepos/submodules. Use for /create-pr or PR/review requests.
Share bugs, ideas, or general feedback.
Create a GitHub pull request from the current branch with an auto-generated title and description based on commit history.
/pr-create [--target <branch>] [--draft] [--title "<title>"]
| Flag | Description |
|---|---|
--target <branch> | Target branch (default: repository's default branch) |
--draft | Create as a draft PR |
--title "<title>" | Override the auto-generated title |
gh CLI must be installed and authenticated (gh auth status)Get the current branch and verify it has commits to push:
git branch --show-current
If on main or master, warn the user — they probably want to create a feature branch first.
Check if the branch has been pushed to the remote:
git log --oneline origin/{branch}..HEAD 2>/dev/null
If there are unpushed commits, push the branch first:
git push -u origin {branch}
Ask the user for confirmation before pushing.
If --target was specified, use that branch.
Otherwise, determine the default branch:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
Check if a PR already exists for this source → target branch combination:
gh pr list --head {branch} --json number,url
If one exists, show the URL and ask the user if they want to update that PR instead of creating a new one.
If --title was specified, use that.
Otherwise, generate a title from the commit history:
git log --oneline origin/{target}..HEAD
Title rules:
Description: Generate a markdown summary:
## Summary
{2-3 bullet points summarizing what this PR does, derived from commit messages and changed files}
## Changes
{list of commits, from `git log --oneline`}
## Files Changed
{output of `git diff --stat origin/{target}..HEAD`}
If commit messages or the branch name reference issues (e.g., fix-123, Fixes #456), include Fixes #<number> in the description body to auto-link.
Before creating the PR, show the user what will be created:
## PR Preview
**Title:** {title}
**Source:** {branch} → **Target:** {target}
**Draft:** {yes/no}
### Description
{description}
Use AskUserQuestion to confirm:
gh pr create --title "{title}" --body "{description}" --base {target} [--draft]
After creation, show:
## PR Created
**PR #{number}:** {title}
**URL:** {url}
gh not authenticated: Suggest running gh auth login.