创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

开发者做 grip:推送前先让 Claude 考你五个问题

AI 总结

在 r/ClaudeAI 发帖的用户 /u/NthOfHisName 发布了 grip:一个免费开源的 Python git pre-push 钩子,它会读取 diff、围绕改动提五个问题并给答案打分,低于及格线时推送会被拦下。该工具直接把本机已安装的 Claude Code 当作模型,因此不需要 API key,并提供 /grip 聊天技能,以及一道闸门:在通过测验前,Claude 自己也无法执行 git push。作者称最新的模式会在浏览器里把改动画成白板并钉上问题,灵感来自 Mitchell Hashimoto 的“白板防御”文章;他做这个工具的起因是几个月来一直在推送 Claude 代写、自己却讲不清楚的代码。

深度见解

该帖描述的流程旨在让开发者在代码推送前能解释 AI 代写的改动;作者称其动机正是那些同事追问“为什么选这个方案”时他自己答不上来的 PR。

After a few months of Claude Code doing most of my typing, I noticed something uncomfortable: my PRs looked fine, but if a teammate asked me "why this approach?" I had to go read my own code first. So I built grip, a git pre-push hook. It reads your diff, asks five questions about it, and grades your answers. Below the pass mark, the push waits. ​The Claude part: The newest mode draws your change as a whiteboard in the browser and pins the questions on it, inspired by Mitchell Hashimoto's "whiteboard defense" post. Free, open source, Python: github.com/guilyx/grip Try it offline first if you're curious: pipx install grip-hook, then grip quiz --provider fake in a test repo. Curious if anyone else has a ritual for this, or if you just trust the tests. submitted by /u/NthOfHisName [link] [comments]

#grip#Claude Code#Anthropic#GitHub

原文约 1 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。