一键导入
code-review
Perform a code review or pull request review on a branch
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform a code review or pull request review on a branch
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | code-review |
| description | Perform a code review or pull request review on a branch |
Use this skill when performing code reviews or pull request reviews.
Focus only on commits that are contained within the branch being reviewed.
Use git diff <base-branch>...HEAD to determine what is in scope.
# List commits on the branch
git log --oneline <base-branch>..HEAD
# Get the full diff for review
git diff <base-branch>...HEAD
# Get diff for a specific file
git diff <base-branch>...HEAD -- <file>
If a bug, convention violation, or inconsistent naming existed in code before the branch, do not treat it as a problem in the review. This includes cases where refactored code retains a pre-existing type name, variable name, or pattern that does not match current conventions.
Only evaluate the changes introduced by the branch.
All new logic, patterns, and naming introduced by the branch MUST follow the
conventions defined in CONVENTIONS.md. Pre-existing code that appears in
the diff due to refactoring is exempt from this requirement.
When delegating file review to sub-agents, provide the output of
git diff <base-branch>...HEAD -- <file> rather than the full file contents.
Sub-agents that receive full files cannot distinguish branch changes from pre-existing code and will flag out-of-scope issues.
If full files must be provided for context, explicitly instruct the sub-agent which line ranges were modified by the branch and that only those ranges are in scope.
Do not request additional test coverage for functionality provided by external libraries. For example:
Focus test coverage requests on:
See the "Test Coverage Philosophy" section in CONVENTIONS.md for more details.
main)git log --oneline <base>..HEAD to understand the scopegit diff <base>...HEAD --stat to see which files changedCONVENTIONS.mdmake