Quality gate for Claude Code
AI ships code fast. Repotoire makes sure it's good. A pre-commit hook that runs 110 pure Rust detectors against the staged diff and denies the commit if it introduces regressions.
How it works
Hook reads the staged diff
Claude Code's PreToolUse hook fires before the commit; the staged diff is piped to repotoire claude-hook on stdin.
Runs repotoire diff with hunk attribution
Hunks are parsed from git diff -U0 and attributed to specific lines so unrelated findings don't cause noise.
Denies or returns a score line
If high-severity findings appear inside hunks, the hook denies. Otherwise it returns a score delta.
What you get
Hunk-level attribution
Only blocks on findings the AI introduces — not pre-existing tech debt.
Baseline-aware
Honors the same baseline as repotoire diff and analyze.
Atomic settings.json edit
Preserves file mode and symlinks. Uninstall is precise.
Severity threshold
Configure the minimum severity that triggers a block.
Same engine as analyze
Same detectors, same scoring, same semantics.
Uninstall in one command
repotoire claude-hook uninstall removes only the Repotoire hook.
Install
Ready to understand
your codebase?
One command. Full analysis. No sign-up required.
Open source · MIT License · Works offline