一键导入
create-pr
Create a GitHub pull request from the current branch or fork. Use when user says "create a PR", "open a PR", "make a pull request", or "PR these changes".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a GitHub pull request from the current branch or fork. Use when user says "create a PR", "open a PR", "make a pull request", or "PR these changes".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | create-pr |
| description | Create a GitHub pull request from the current branch or fork. Use when user says "create a PR", "open a PR", "make a pull request", or "PR these changes". |
Run in parallel:
git status
git remote -v
git log --oneline -10
Then determine:
master/main or a feature branch?upstream (fork scenario) or just origin?git log upstream/master..origin/master --oneline # if upstream exists
git log origin/master..HEAD --oneline # if no upstream
| Scenario | Head | Base |
|---|---|---|
| Feature branch → same repo | current-branch | master or main |
| Fork → upstream repo | fork-owner:master | master |
To find the upstream org/repo:
git remote get-url upstream
To find the fork owner:
gh repo view --json nameWithOwner -q .nameWithOwner
git log <base>..<head> --oneline
Read the actual diff to understand what changed:
git diff <base>..<head> --stat
<type>(<scope>): <description>## Summary
- [bullet summarising change 1]
- [bullet summarising change 2]
- [bullet summarising change 3]
## Test plan
- [ ] CI checks pass
- [ ] [Any manual verification steps relevant to the changes]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
If the PR closes a GitHub issue, add Closes #N on its own line in the summary.
If the branch hasn't been pushed yet:
git push -u origin <branch>
gh pr create \
--repo <target-repo> \
--head <head> \
--base <base> \
--title "<title>" \
--body "$(cat <<'EOF'
<body>
EOF
)"
Then output the PR URL.
ALWAYS:
--head and --repo correctlyNEVER:
git push --force without explicit user approvalBootstrap or update a AGENTS.md file that gives Codex persistent project instructions. Use when starting a new project, onboarding Codex to an existing repo, or updating project conventions.
Create well-structured git commits following Conventional Commits format. Use when user says "commit", "create a commit", or "save these changes".
Create well-structured GitHub issues following a consistent format. Use when user says "create an issue", "draft a task", "log a bug", or "document this feature".
Create a GitHub pull request from the current branch or fork. Use when user says "create a PR", "open a PR", "make a pull request", or "PR these changes".
Triage and fix GitHub issues end-to-end. Fetches the issue, explores relevant code, plans the fix, implements with TDD, and verifies. Use when user says "fix issue #N", "work on this issue", or references a GitHub issue number.
Review GitHub pull requests by fetching diffs, analyzing code quality, checking conventions, and optionally posting review comments. Use when user says "review this PR", "check PR #N", or shares a PR URL.