Skip to content
HUIAHUB

Coding & dev tools

Sphinx

A Git hook that asks developers a question about an agent-written change before the push goes through.

Verified Open source

What Sphinx does

Sphinx is a Git hook for developers who write code with coding agents. When a push targets a protected branch, Git waits while Sphinx asks you to predict what the change will do, often when something goes wrong. A wrong answer gets an explanation and another try, usually with a new scenario. A correct answer lets the same push continue, whether you or the agent ran git push.

The questions come from a separate reviewer model. It reads the committed change through read-only Git tools and never sees the conversation that produced the code. That reviewer can run on a signed-in Claude Code or Codex plan, through OpenRouter, or on any OpenAI-compatible endpoint. Sphinx has no account or hosted service of its own. After install it checks pushes to main or master, and each repository can set its own branches and events in a .sphinxconfig file.

The changed code, related files and your answers go to the reviewer provider. Your answers do not go to the coding agent. By default, .env files, private keys and common credential files are excluded, and a .sphinxignore file keeps other paths out. The sphinx yolo command turns checks off, and every skip is logged with its reason.

Sphinx suits developers and teams who push agent-written changes and want a short comprehension check before code lands. The README calls it practice rather than a security gate: anyone with local access can bypass the hooks, and the examiner is an LLM that can be wrong. Version 0.1 covers local commits and pushes only.

  • Check that you understand an agent-written change before it reaches main.
  • Add a question step to pushes or commits on selected branches of a repository.
  • Practice reasoning about failure cases, such as retries and crashes, in your own diffs.
  • Mark pushed commits on GitHub after a pass, using a signed-in gh CLI.

Who should use it

  • Developers who ship code written with Claude Code, Codex, Cursor, OpenCode or Pi.
  • Teams that want a shared per-repository policy for when checks run.

Who should look elsewhere

  • Native Windows users, since the README says it is not supported yet.
  • Teams that need a security gate or a code audit, which the README says Sphinx is not.
  • Workflows that need checks on web merges, CI or deployments, which version 0.1 does not cover.

Strengths

  • MIT licensed, with no account or hosted service of its own.
  • Runs reviews on an existing Claude Code or Codex plan, OpenRouter or an OpenAI-compatible endpoint.
  • Excludes .env files, private keys and common credential files from review by default.
  • Logs every skip and yolo toggle with its reason.

Limitations

  • Requires Node.js 22.19 or newer on macOS, Linux or WSL.
  • Sends the changed code and your answers to the chosen reviewer provider.
  • A blocked push waits up to 25 minutes, and a coding agent's shell may time out sooner.
  • Has no default cap on model calls; a typical check makes about 5 to 8 requests plus about one per answer.

Privacy notes

The README says the reviewer provider receives the changed code, related files from the commit, your answers and `.sphinxcontext.md`, and that ignored files are never read. It excludes `.env` files, private keys and common credential files by default, but its path rules will not catch a secret pasted into ordinary source.

Sources