Make Pr Easy To Review

作者 cursorccb5507cec15无许可证10K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

Prepare PRs for review by cleaning noisy history, improving PR descriptions, and adding reviewer guidance without changing code behavior. Use for "make this easy to review", "tidy this PR", "clean up commits", or "annotate the diff".

AI 生成的概览

通过清理提交历史并添加评审指引,在不改变代码行为的前提下让拉取请求更易于评审。

功能
该技能会检查目标拉取请求的提交、差异大小、变更路径、生成文件和描述,找出可评审性问题,例如提交杂乱、描述过时、无关变更或缺少测试。它会在重写历史或强制推送前提出方案,然后应用安全的改进,并验证目录树或差异仍与预期代码一致。它还会生成评审指引,例如 TL;DR、区分核心文件与机械性文件,以及标注有风险的行为变更、迁移顺序、发布计划和测试覆盖情况。
适用场景
当拉取请求需要更易于评审时使用,例如整理 PR、清理提交或为差异添加注释。它适用于目标是在不改变行为的前提下提升可评审性的场景。
运行要求
需要 git 和 GitHub CLI(gh)来检查和重写拉取请求历史。它不附带脚本,仅为说明性指令。

Make PR Easy to Review

Prepare a PR so a reviewer can quickly understand the intent, important files, and risk. The default goal is reviewability without behavior changes.

Workflow

  1. Resolve the target PR from the user-provided URL or current branch.
  2. Inspect commits, diff size, changed paths, generated files, and PR description.
  3. Identify reviewability issues: noisy commits, stale description, unrelated changes, mixed mechanical and logic changes, missing tests, or unclear reviewer entry points.
  4. Propose a plan before rewriting history or force-pushing.
  5. Apply safe improvements, then verify the tree or diff still matches the intended code.

History Cleanup

Only rewrite history when the user asks for it or agrees to the plan. Before rewriting:

bash
gh pr view <PR> --json title,headRefName,baseRefName,state,commitsgit fetch origin <headRefName> <baseRefName>ORIGINAL_TREE=$(git rev-parse origin/<headRefName>^{tree})

Good commit groupings usually follow dependency order:

  1. Schema/storage or generated API definitions.
  2. Core logic.
  3. Wiring and integration.
  4. UI or surface behavior.
  5. Tests.

After rewriting, verify content identity:

bash
echo "Original tree: $ORIGINAL_TREE"echo "Current tree:  $(git rev-parse HEAD^{tree})"git diff origin/<headRefName> --stat

Do not push if the tree changed unintentionally.

Reviewer Guidance

When code behavior should stay untouched, prefer PR description and review notes:

  • Add a TL;DR that matches the actual diff.
  • Separate core files from generated or mechanical files.
  • Call out risky behavior changes, migration order, rollout plan, and test coverage.
  • Link issue trackers, dashboards, or design docs when they explain intent.

Guardrails

  • Never hide meaningful behavior changes inside "cleanup".
  • Do not bypass hooks unless the user explicitly asks.
  • If the PR is too large to make reviewable with notes, recommend splitting instead of polishing around the problem.

来源与署名

来源:cursor/plugins位于cursor-team-kit/skills/make-pr-easy-to-review提交ccb5507

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架