一键导入
pr-open
Open or create a pull request from the current branch with a clean, deduplicated summary
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Open or create a pull request from the current branch with a clean, deduplicated summary
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a GitHub issue with project board integration
Explain recent code changes in simple terms a junior dev can understand
Create a release PR to main with version bump and draft a GitHub release
Start working on a GitHub issue — fetch context, create branch, plan solution, and optionally open a PR
| name | pr-open |
| description | Open or create a pull request from the current branch with a clean, deduplicated summary |
| argument-hint | [optional target branch or PR number] |
Open a new pull request (or view an existing one) from the current branch. Generates a clear summary and deduplicated checklist of changes, asks the user which branch to target and whether to request reviewers.
pr-open — Create a PR from the current branch (asks for target branch)pr-open main — Create a PR targeting mainpr-open dev — Create a PR targeting devRun these commands in parallel:
git status
git branch --show-current
gh auth status
Verify:
gh CLI is authenticated. If not, inform the user and stop.If $ARGUMENTS contains a branch name, use it as the target branch.
If $ARGUMENTS is empty, ask the user which branch to create the PR against. Show common options and recent remote branches:
git branch -r --list 'origin/*' --sort=-committerdate | head -10
Present the branches as options and let the user pick. Default suggestion should be main if it exists, otherwise the most common base branch.
Fetch the full diff and commit history between the target branch and the current branch:
git log <target>..HEAD --pretty=format:"%h %s (by @%an)" --no-merges
git diff <target>..HEAD --stat
If there are zero commits ahead, inform the user there is nothing to open a PR for and stop.
Title:
feat: or fix:)Description:
Build the PR body with these sections:
## Summary
[2-4 sentences describing what this PR does and why. Focus on the "why" and the user-facing impact.]
## Changes
- [Deduplicated checklist item 1]
- [Deduplicated checklist item 2]
- [Deduplicated checklist item 3]
...
Deduplication rules for the Changes list:
(by @<author>) to that checklist item. If all changes are by the same person, omit attribution entirely.Do NOT include:
Check if the branch is already pushed and up to date:
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
git status -sb
If the branch is not pushed or is ahead of remote, push it:
git push -u origin $(git branch --show-current)
If push fails, show the error and let the user decide how to proceed.
gh pr create \
--base <target-branch> \
--head "$(git branch --show-current)" \
--title "<title>" \
--body "$(cat <<'EOF'
<the PR body from Step 4>
EOF
)"
If a PR already exists for this branch, detect it and show the existing PR URL instead of failing:
gh pr view --json url --jq '.url' 2>/dev/null
After the PR is created, ask the user:
"Should this PR request a reviewer?"
Present options:
gh api repos/{owner}/{repo}/collaborators --jq '.[].login'
If the user selects reviewers:
gh pr edit <pr-number> --add-reviewer <reviewer1>,<reviewer2>
Output a clean summary:
PR created!
Title: <title>
Target: <target-branch>
URL: <pr-url>
Reviewer: <reviewer(s) or "None">
The PR URL is the most important output — make sure it is clearly visible.
gh CLI is not installed or not authenticated, inform the user and stop$ARGUMENTS