Read your own pull request before a maintainer has to. A tiny, local, zero-API self-check that catches the obvious problems in your changes before you open the PR.
中文见下方 ↓
AI made writing code cheap. It did not make reviewing code cheap. Maintainers call this the validation bottleneck — the widening gap between when code is written and when a human can confidently review it. In 2026, open-source maintainers are drowning in low-quality, AI-generated pull requests — so much that projects like curl shut down their bug bounty and QEMU / NetBSD banned AI contributions outright.
Almost every tool built in response is a maintainer-side gatekeeper (paid,
runs in CI, judges you). prcheck flips it: it's a contributor-side mirror.
It runs on your machine, before you push, and just shows you what a reviewer
will see — so you can be the good kind of AI-assisted contributor.
- Local & private — runs on your changes, nothing leaves your computer.
- No API key, no account, no network. Pure
git+ heuristics. - It never blocks you. It reports; you decide.
pipx install prcheck # or: pip install prcheckOr run it straight from the repo with no install:
python -m prcheckFrom inside your feature branch:
prcheck # compares against main/master automatically
prcheck --base develop # or pick your own base branch| Check | What it flags |
|---|---|
| Tests | code changed but no test files touched |
| Commit message | empty or vague (update, wip, .) |
| Size & scope | huge or sprawling diffs that review slowly |
| Secrets | credential-looking strings (API keys, tokens, private keys) |
| Leftovers | debug prints, TODO/FIXME, merge-conflict markers, CI edits |
echo 'prcheck --strict' > .git/hooks/pre-push && chmod +x .git/hooks/pre-pushWith --strict, prcheck exits non-zero if there's anything worth a look. It's
opt-in on purpose — a self-check, not a mandatory gate.
A mirror, not a gate. prcheck never edits, comments, closes, or merges. The human stays in control — that's the whole point.
See CONTRIBUTING.md. Keep it dependency-free; add a test for every check. New ideas welcome — check the open issues. MIT licensed.
在维护者替你审查之前,先自己读一遍你的 PR。 一个超轻量、本地运行、零 API 的自检小工具:在你提交 Pull Request 之前, 先帮你抓出改动里那些一眼能看出的问题。
AI 让"写代码"变便宜了,却没让"审代码"变便宜。维护者把这叫做验证瓶颈—— 代码被写出来、到有人能放心审完它,这中间的鸿沟越来越大。2026 年,开源维护者正被 海量、低质量、AI 生成的 PR 淹没——以至于 curl 关停了漏洞赏金、QEMU / NetBSD 直接禁止 AI 贡献。
市面上的应对工具几乎全是维护者端的"门卫"(收费、跑在 CI 里、审判你)。
prcheck 反过来:它是贡献者端的"镜子"。在你 push 之前、在你自己电脑上运行,
把维护者将会看到的东西先照给你——让你成为"靠谱的那种" AI 辅助贡献者。
- 本地、私密——只看你的改动,什么都不上传。
- 不需要 API key、不需要账号、不联网。 纯
git+ 规则判断。 - 它绝不拦你。 只负责提示,决定权在你。
pipx install prcheck # 或:pip install prcheck也可以免安装,直接在仓库里跑:
python -m prcheck| 检查项 | 提示什么 |
|---|---|
| 测试 | 改了代码却没动测试文件 |
| 提交信息 | 空的、或只写了 update / wip / . |
| 体量与范围 | PR 太大、或摊得太散,审起来慢 |
| 密钥 | 像密钥/令牌/私钥的字符串 |
| 遗留物 | 调试 print、TODO/FIXME、合并冲突标记、CI 改动 |
echo 'prcheck --strict' > .git/hooks/pre-push && chmod +x .git/hooks/pre-push是镜子,不是闸门。prcheck 绝不修改、评论、关闭或合并任何东西。 人始终掌握主动权——这正是它的意义。
MIT License.
