跳到正文
Skillpedia
部署与云(DevOps)103k · #805

github-pr-workflow

它能做什么

这个工具可以帮你把代码整理到适合他人审阅的状态。它确保改动清晰易懂,并且能按预期工作。

适用场景

  • ✓当你完成代码改动,希望别人帮忙审阅时。
  • ✓当审阅者要求你修改,你需要提交修改内容时。
  • ✓当代码等待审阅已经有一段时间,需要更新或补充更多信息时。

技能链接

https://github.com/paperclipai/paperclip/blob/master/packages/skills-catalog/catalog/bundled/software-development/github-pr-workflow/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/paperclipai/paperclip/blob/master/packages/skills-catalog/catalog/bundled/software-development/github-pr-workflow/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我整理代码以便审阅,包括清晰的摘要、我的测试方法以及其他重要细节。”

每周 5 个新技能,1 分钟读完。

工作原理

该工具会整理你的代码,确保关于改动的说明清楚明了,并帮你展示所做的测试过程。它还能协助你回复审阅者的评论。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

GitHub Pull Request Workflow

Ship a PR a reviewer can land without follow-up clarifying questions. The aim is high signal in the title and body, evidence the change works, and clean replies when feedback comes in.

When to use

  • You are about to open a PR for a change that is functionally complete.
  • A reviewer left comments and you need to respond and push fixes.
  • A PR has been open more than a day and needs to be brought back into shape (stale conflicts, missing description, missing verification).

When not to use

  • The change is not yet functionally complete. Finish the work first; draft PRs that bounce on review are noise.
  • The repository uses a non-GitHub forge. Adjust to that forge's conventions; do not force GitHub-isms.

Branch hygiene before opening

  • Rebase or merge from the target base so the diff is current.
  • Squash WIP commits into reviewable units. Prefer one commit per logical change; do not force one-commit-per-PR if the work is genuinely multi-step.
  • Confirm tests, typecheck, and lint pass locally. Note any deliberate skips in the PR body.
  • Remove debug prints, commented-out code, and TODO markers that are not tracked.

PR title

  • Imperative mood, under 70 characters.
  • Lead with the user-visible change, not the file touched. Allow CSV export from reports table beats Update reports.tsx.
  • If the repo uses an issue prefix convention (PAP-1234:, [security]), follow it.
  • No trailing period.

PR body

Use this structure:

## Summary
- 1–3 bullets describing what changed and why.

## Implementation notes
- Anything non-obvious in the diff: trade-offs, dropped alternatives, gotchas.
- Migration or config implications.

## Verification
- The exact commands or steps you ran.
- Screenshots or short clips for UI changes (required if pixels moved).
- Edge cases you exercised by hand.

## Risk and rollback
- What breaks if this is reverted, and how to revert cleanly.

Skip the Risk and rollback section only for clearly trivial PRs (typos, docs).

Verification evidence

  • Tests passing in CI is necessary, not sufficient. Reviewers also need to know the change behaves correctly end to end.
  • For UI work, include screenshots of the golden path and one edge case. Tag dark and light mode if the project supports both.
  • For migrations, include a dry-run plan and reversal steps.
  • For performance changes, include a before/after measurement, not adjectives.

Replying to review comments

  • Reply on every comment, even with just "fixed in <commit-sha>" — silent fixes leave the reviewer guessing.
  • Push fixes as new commits while review is active; do not amend during review unless the reviewer agrees.
  • If you disagree with feedback, say so with one sentence of rationale and let the reviewer decide. Don't escalate over comments.
  • Re-request review explicitly after pushing changes.

Merge checklist

  • All required checks green.
  • All review comments resolved.
  • PR title/body still accurate (update if scope changed mid-review).
  • Linked issue moves to in_review or done per project convention.
  • Delete the branch after merge unless it is a long-lived integration branch.

Anti-patterns

  • PR description that says "see commits". Reviewers should not need to read the log.
  • Mixing refactor and behavior change in the same PR with no separation in the body.
  • "Address feedback" commits that bundle unrelated edits. One commit per round of feedback is fine; one commit for everything in flight is not.
  • Force-pushing during active review without telling the reviewer.
常见问题

为什么清晰的标题和描述很重要?

清晰的标题和描述能帮助审阅者快速了解改了什么、为什么改,以及如何测试。这样既节省时间,也能避免误解。

什么是“提交”(commit),为什么要整理它们?

提交就像你工作的“存档点”。整理提交,就是把小而相关的改动合并成一个“存档点”,让代码的历史记录更干净,也更容易理解。

每次改动都需要附上截图吗?

对于会影响程序视觉外观的改动,截图尤其重要。它能直观展示这些改动在实际中的效果。

详情

作者的原始描述

Prepare a GitHub pull request from a feature branch — branch hygiene, commit shape, title/body, verification notes, screenshots for UI work, and replies to review comments.

repo: paperclipai/paperclip

热度

GitHub 星标
103k
排名
#805
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能