一键导入
open-pr
Create a GitHub pull request with structured summary, components, and test plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a GitHub pull request with structured summary, components, and test plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | open-pr |
| description | Create a GitHub pull request with structured summary, components, and test plan |
| argument-hint | ["base-branch"] |
| user-invocable | true |
| allowed-tools | Bash, Read, Grep, Glob, Write |
Create a GitHub pull request for the current branch using gh pr create.
Determine base branch: Use $ARGUMENTS as the base branch. If empty, default to develop.
Check prerequisites:
git status — if there are uncommitted changes, warn the user and ask whether to continue.git log <base>..HEAD --oneline to see all commits being merged.git diff <base>...HEAD --stat to see changed files summary.git diff <base>...HEAD to read the actual code changes (truncate if too large).Analyze changes deeply: Read the diff output and commit messages carefully. Understand:
Write the PR body to a temp file: Create a file at .aru/tmp_pr_body.md with this exact structure:
## Summary
- First bullet explaining the main change and WHY it was needed
- Additional bullets for other notable changes
## Components
- `path/to/file.py` — Brief description of what changed in this file
- `path/to/other.py` — Brief description
## Test Plan
- [ ] Describe how to verify the change works
- [ ] Additional verification steps
Rules for the PR body content:
Generate a concise PR title: Under 72 characters, in imperative mood (e.g., "Add retry logic to API client", "Fix token count in context pruning"). Do NOT just repeat a commit message — synthesize the overall change.
Push the branch if not already pushed:
git push -u origin HEAD
Create the PR using --body-file pointing to the temp file:
gh pr create --base <base-branch> --title "<title>" --body-file .aru/tmp_pr_body.md
CRITICAL: Always use --body-file with the temp file. NEVER use --body with inline text — it causes quoting/escaping issues that corrupt the PR description.
Clean up: Delete .aru/tmp_pr_body.md after the PR is created.
Return the PR URL shown in the gh output.
--body-file with a temp file. NEVER use --body with inline text or heredocs.echo with quotes to build the body — use write_file tool to create the temp file instead.