全部文章
Technical skills

如何用 Claude 或 Gemini 核查候选人的 GitHub 项目

用 Claude 或 Gemini 核查 GitHub 项目:粘贴提交记录和 README,并要求引用证据。没有规则时,Gemini 把一个仓库判成了'Real'。

  • Better hires
  • Saves time
  • Consistent decisions

2026年9月14日 · 5 分钟阅读

提示词为英文:在各类AI工具中英文提示词效果最佳。

周一下午 4:40。一个后端岗位的候选名单上有四份简历,每份的"项目"下面都有一个 GitHub 链接。你看不懂代码。点开第一个链接,只看到一堆文件、一个绿色方块的日历和一份 README,于是你关掉了页面。用人经理问:"这些是真的吗?"你说你去核实一下。

不读一行代码,你也能核实其中一部分:谁提交的、提交了多少次、什么时候提交的,以及 README 里写了什么。AI 很擅长读完这堆信息,并告诉你它说明了什么。

**简短回答:**要用 Claude 或 Gemini 核查候选人的 GitHub 项目,请复制总提交数、各作者的提交数、最新 15 次提交及其代码行数、按文件夹列出的文件清单、README,以及 package 文件(如果有),然后让模型对每个项目只给出一个结论,附上一句引用的证据,并保留"cannot tell"(无法判断)这个选项。在我们的测试中,加上这些规则之后,两个工具给出的结论都是对的。没有这些规则时,Gemini 在无法证明的证据上把一个项目判成了"Real",而在招聘沟通中,这样的话会传得很远。

这种方法能告诉你什么,不能告诉你什么

它能看出一个项目是一步步做出来的还是一次性扔上去的,候选人有没有提交过他声称的那些代码,以及 README 有没有把功劳归给别人。它无法评判代码质量,也无法确认一个人的真实身份:git 的作者名和日期谁都可以随便填。请把这个结论当作在电话面试中提出更好问题的理由,而不是拒绝候选人的理由。

该复制什么,该去掉什么

复制:总提交数、各作者的提交数、最新 15 次提交及其代码行数、按文件夹列出的文件清单、README,以及 package 文件(如果有)。如果你自己不会运行 git,可以请工程师同事帮你执行下面两条命令,把输出发给你:

git shortlog -sn HEAD
git log -15 --date=short --format='%h | %an | %ad | %s' --shortstat

其中一个项目的粘贴内容如下:

CV claim: Built a job queue with retries and a dead-letter list in Python.
Total commits: 2
     2	Noa Barak
15934a0 | Noa Barak | 2026-05-02 | docs
 1 file changed, 2 insertions(+)
e3cab68 | Noa Barak | 2026-05-02 | Initial commit
 4 files changed, 27 insertions(+)

请去掉邮箱地址(有作者姓名就够了,数提交次数也需要姓名),以及别人遗留在文件里的任何私钥或令牌。公开仓库同样属于个人数据,所以请只在公司批准使用的 AI 账号中粘贴这些内容。

四个虚构项目,一个简单问题

我们用真实的 git 搭建了四个仓库,人物都是虚构的,并在运行任何测试之前先写好了标准答案:

  • **一个 fork:**候选人在 62 次提交中只做了 2 次,每次只改一行,而简历上写的是"core maintainer"
  • **一个照搬的模板:**只有一次提交,共 40,559 行,README 和 package 文件都注明了某模板公司
  • **一个整洁但凌乱的项目:**三个月内 13 次提交,有一次 revert、一个时区 bug,还有一条备注"uncle asked for it"
  • **一个经过 squash 但确实是本人做的项目:**只有 2 次提交,因为候选人在发布前整理了提交历史,README 里有一份真实的设计说明

我们虚构的仓库都很小,每个真实项目只新增了约 30 行代码,所以这个测试无法说明如何判断一个项目的代码量有多大。

我们先问了那个简单问题:"Is the work in each of these GitHub projects real, or copied?" Claude(Opus,全新会话)回答得不错。它把照搬的模板判为"Copied",把 fork 判为"inflated"(夸大),把只有 2 次提交的项目判为"Can't tell yet"。Gemini(gemini-3.8-flash)两次运行都同样言之凿凿,而且有一处判错了:它把 squash 过的项目判成"Real (Original learning project; CV claim is accurate)"。git 历史是证明不了这一点的。它还把模板称为"Plagiarized",把 fork 的说法称为"fabricated"。在招聘沟通中,这样的话会传得很远。Gemini 的两次运行都出现了这种情况;加上规则之后,没有一次出现。

项目 简单问题 加上规则后
Squash 过的真实项目 Claude:can't tell。Gemini:"Real" 两者:"Cannot tell from this evidence"
Fork,62 次提交中占 2 次 Claude:inflated。Gemini:"fabricated" 两者:"Weak or overstated"
照搬的模板 Claude:copied。Gemini:"Plagiarized" 两者:"Looks copied"
凌乱的真实项目 两者:real 两者:就"做出了这个项目"给出"Supports the claim";但没有证明每天都在用
回答中表示结论确定的词(plagiarized、fabricated、false、grossly)
简单问题加上规则后ClaudeClaude: 简单问题 3words, 加上规则后 0words3words → 0wordsGeminiGemini: 简单问题 6words, 加上规则后 0words6words → 0words

每个工具 2 次运行的合计。

Source: 我们的测试,由脚本根据保存的回答统计

Show the data
简单问题加上规则后
Claude3words0words
Gemini6words0words

带规则的提示词

PERSONA
You are a technical recruiter's assistant. You help a non-engineer judge whether a candidate's linked GitHub project backs up what their CV claims. You never decide to reject anyone.

TASK
For each project below, compare the CV claim with the evidence. Give one verdict: "Supports the claim", "Weak or overstated", "Looks copied", or "Cannot tell from this evidence".

CONTEXT
The evidence for each project is the commit count, the commits per author, the newest commits, the file list, the README and package.json where one exists. It is all I have; I cannot read the code.
Rules:
- Quote the exact line or number behind every verdict.
- A project with few commits is not proof of copying: people sometimes publish a cleaned-up history. Say what else would settle it.
- A fork or a team project counts only for the commits the candidate made. Count them.
- If the evidence does not show something, write "not enough information". Do not guess.
- Judge the work, not the person. Ignore names, and do not infer anything from the commit times of day.

FORMAT
1. A table: Project | Verdict | The one line of evidence
2. For each project: what the evidence shows, what it does not show, and one question to ask the candidate in a call.

EVIDENCE:
[for each project: the CV claim, then total commits, commits per author, the newest 15 commits with their line counts, the file list by folder, the README, and the package file if there is one]

加上规则之后,四次运行的结果都与我们的标准答案一致。即便如此,"Supports the claim"也从未涵盖简历里的"daily"(每天)一词:两个工具都说,没有证据表明每天都在使用。两个工具再也没有说过"plagiarized"或"fabricated",而且每个结论都附有一句引用的证据。每份回答里最有用的部分,是留给电话面试的问题。对于那个 squash 过的项目,Gemini 建议这样问:"能带我过一遍 queue.py 的实现吗?请说明你的重试机制和 dead-letter 列表是如何处理 worker 错误的?"这个问题比任何提交次数都更能检验那条说法。

它仍然会出错的地方

  • **候选人自己的作者名。**证据写的是"Tal Ashkenazi made 2 commits",但没有任何东西能证明 Tal 就是你的候选人。Claude 指出了这一点,并按两种情况分别统计,Gemini 没有。请自己核对 GitHub 个人主页的名字与简历是否一致。
  • **照搬模板不一定是撒谎。**模板的许可证(我们虚构的案例里是 CC-BY-4.0)允许在注明出处的前提下复用。问题出在简历上写的"designed and built"(设计并开发),而不是下载模板这件事。

电话面试要问的问题

取自保存下来的回答,并把虚构的名字换成了占位符:

Fork: Can you send me a link to the original project where your maintainer role shows, for example pull requests you reviewed or releases you published?
Template: The README and package file credit [template company]. Which parts of this project did you design or write yourself?
Squashed history: Your README says [a weakness you noted]. Can you explain why, and what would change in the code?
Live tool: How does [the shop] use it day to day, and what has broken or needed changing since you deployed it?

在电话面试中让对方现场讲解一小段代码,比这些数字更能说明问题。

Claude Opus,审阅四个虚构的仓库

**下一步:**把这些问题和开发人员简历筛选清单配合使用,并且在向任何人提出质疑之前,先读一下如何告诉候选人他的代码被标记为 AI 生成。

This article is general information, not legal advice. Laws differ by country and change often, so consult your lawyer before you rely on it for your situation.

继续阅读