The console script is:
post-turn-quality-stop-hook
The command reads Claude Code's stop-hook JSON payload from standard input. The
payload may include a cwd field. Repository discovery uses this order:
- The payload
cwd, when present and non-empty. - The
CLAUDE_PROJECT_DIRenvironment variable, when present and non-empty. - The process current working directory.
Invalid or missing JSON is treated as an empty payload. If the selected working directory is not inside a Git repository, the hook exits successfully and prints nothing. That keeps stop-hook behaviour quiet for unrelated invocations.
The hook follows Claude Code's blocking contract:
- Successful checks print nothing and exit with status
0. - Failed checks print JSON with
{"decision": "block", "reason": "..."}and also exit with status0.
The command accepts one CLI option:
post-turn-quality-stop-hook --config /path/to/config.toml
An explicit config file has the highest precedence. Invalid CLI arguments are
reported as a blocking JSON payload and still exit with status 0.