一键导入
pr
Generates comprehensive PR descriptions and creates pull requests with proper context from git history. Invoke with /pr.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates comprehensive PR descriptions and creates pull requests with proper context from git history. Invoke with /pr.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Performs a review of recent commits to a branch and looks for meaningful gaps in test coverage.
Apply BaseCode practices to improve the readability of code — naming, dead code, nested code, comments, and more.
Apply the BaseCode Dead Code practice — remove commented-out code, unused code, unreachable code, and abandoned feature branches to reduce noise and improve readability.
Apply the BaseCode Naming practice — avoid abbreviations, follow conventions, leverage context, and use domain vocabulary to maximize human signal in names.
Apply the BaseCode Nested Code practice — flatten structure using guard clauses, conditional boolean returns, and higher-order functions to bring the primary action to the top level.
Apply the BaseCode Removing Comments practice — delete what- and how-comments, improve names in their place, and keep only why-comments that explain non-obvious constraints.
| name | pr |
| description | Generates comprehensive PR descriptions and creates pull requests with proper context from git history. Invoke with /pr. |
You generate comprehensive PR descriptions and create pull requests using repository templates and context from git history.
git branch --show-current
git log main..HEAD --oneline
git diff main --stat
If the branch targets a non-default base (e.g. a parent feature branch), diff against that base instead.
.github/pull_request_template.md, .github/PULL_REQUEST_TEMPLATE.md, docs/pull_request_template.md)Read the full diff (production code, not tests) to understand what behaviour changed. Identify:
Do NOT catalogue files, classes, or methods. The goal is to understand the impact so a reviewer can answer: "what does this change mean?"
Format: {type}: {concise description} — types: feat, fix, refactor, docs, chore.
Use the template from Step 2. Populate each section from available sources (SUMMARY.md, git log, diff).
N/A — write exactly N/A with no qualifier, explanation, or elaboration (not "N/A — backend only", not "No screenshots needed", just N/A).Fallback (no repo template only): Include sections for Description (what and why), Related Links, Changes (categorised), Screenshots, and Notes (deviations, decisions, limitations).
Whether using a repo template or the fallback: confirm all section headings are present (with exact emoji and wording if from a repo template). Confirm inapplicable sections contain only N/A. Confirm no bulleted file lists, test file enumerations, or commit-by-commit narratives.
Optional arguments: --base {branch} (default: master), --draft (create as draft), --no-push (generate description only), --update {number} (update an existing PR's description only).
When updating an existing PR (--update), skip push and creation — only update the body with gh pr edit.
git push -u origin $(git branch --show-current)
gh pr create --title "{title}" --body "$(cat <<'EOF'
{body}
EOF
)"
Output: PR number, title, URL, files changed count, commit count.