← sources

I kept pushing code Claude wrote that I couldn't explain, so I made Claude quiz me before every push

source: reddit (reddit:ClaudeAI)published 2026-10-21 10:36ingested 2026-10-22 02:37

retained text

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:

* It uses your existing Claude Code install as the model, so no API key needed.
* There's a /grip skill: Claude asks you the questions in chat, and it's told to never answer them for you.
* There's a gate that stops Claude itself from running git push until you've passed.

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](http://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.

document fetched 2026-10-22 00:23 · canonical https://reddit.com/r/ClaudeAI/comments/1xbjn2x/i_kept_pushing_code_claude_wrote_that_i_couldnt