在 PR URL 后加 .diff,10 秒获得 AI 代码审查
Original title: Get an AI code review in 10 seconds
The title and summary in the selected language are awaiting translation.
在任意 GitHub PR 链接末尾加上 .diff,复制原始 diff 粘贴进 Claude、ChatGPT 等 LLM,即可在 10 秒内获得初步代码审查,无需 Copilot Enterprise、浏览器扩展或特殊工具。作者强调这不能替代同事的真实代码审查,但能快速发现明显问题、补充遗漏的边界情况,缩短开发周期。
Here’s a trick I don’t see enough people using:
Add
.diffto the end of any PR URL and copy&paste into a LLM for a quick initial review.
You can get an instant feedback on any GitHub PR.
No Copilot Enterprise. No browser extensions. No special tooling.
Example
- PR Link:
https://github.com/RahulPrabha/oldmanrahul.com/pull/11 - Add
.diffto the end:https://github.com/RahulPrabha/oldmanrahul.com/pull/11.diff - Copy the raw diff
- Paste it into Claude, ChatGPT, or any LLM (Maybe add a short instuction like:
please review.)
So no more human reviewers?
This isn’t a replacement for a real code review by a peer, but it’s a great way to get a first pass in short order.
You’ll catch obvious issues, get suggestions for edge cases you missed, and show up to the real review with cleaner code.
It’ll shorten your cycle times and be a courtesy to others.
Cheers!
Source: Hacker News · AI Code Review 讨论 · oldmanrahul.com