Skip to the content.

test-gate

A Stop hook that runs your tests when Claude tries to end a turn in which code files changed. Failing output is sent back so Claude keeps working. Includes a read-only test-fixer subagent.

Install: claude plugin install test-gate@ralpberry-plugins

Configure in .claude/test-gate.json (optional; otherwise auto-detected from package.json, pytest config, go.mod, Cargo.toml or a Makefile test target):

{ "command": "pytest -q -x tests/unit", "timeout": 300, "enabled": true }

Set "enabled": false to switch it off for one repository. It never blocks twice in a row (stop_hook_active), so it cannot trap Claude in a loop.