Sphinx - Git hook that quizzes you on AI-generated code

Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping

Sphinx is a Git hook for agent-assisted development that ensures you understand the code your AI writes before it ships. When you push, it pauses on protected branches and asks a scenario-based question about your diff—like what happens when a payment fails. Answer correctly to proceed; get it wrong and learn why, then try again. It works with Codex, Claude Code, Cursor, OpenCode, Pi, or plain Git, and runs on minimal tokens via your coding agent, OpenRouter, or any OpenAI-compatible endpoint. Install with npm and start pushing with confidence.

Outsource your thinking, not your understanding.
  1. theParadox42

    I certainly feel like certain AI coding practices I have leave me with nothing learned in a frustrating way. Sometimes the most effective way to getting what I want is just describing a goal really clearly, and then bashing the AI until it gets there. That bashing process can take a lot of energy and yet I don’t gain useful skills or a “better way” that I would if I was still coding. I generate more training data for BigAI corp, but that’s a slow return cycle.

    Not sure if this is the right solution, but I would like to learn/understand/grow more as I pursue reckless efficiency.

  2. alex-moon

    "Success is 10% inspiration and 90% perspiration." - Socrates

  3. freshnode

    Have you ever heard the idiom "ambulance at the bottom of the cliff"?

  4. maximg68

    After noticing a drop in my understanding of the code I ship, I built and started using a similar skill ("Quiz me on the PR or the current branch"). I didn't tie it to a specific commit, though - to me it makes more sense to look at the PR as a whole.

    So far I was positively surprised with the questions it could come up with.

  5. chacha-bong

    Lol I built this and immediately got frustrated with it and stopped using it. I think I don't like being questioned by someone who I expect to work like magic.

More from this day

2026-10-18