Skip to main content
INTEGRATION · v0.7.1

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.

git commit -m "fix race in worker pool"
⊘ Repotoire blocked this commit
1 high-severity finding introduced:
• [taint] cleartext-credentials src/auth.rs:42
Score: 88 → 81 (-7)

How it works

1

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.

2

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.

3

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

repotoire claude-hook install
✓ Hook installed: repotoire claude-hook run
✓ Created: ~/.claude/settings.json
ℹ Run `repotoire analyze` to seed the diff baseline
ℹ If Claude Code is open, restart to pick up the new hook

Ready to understand
your codebase?

One command. Full analysis. No sign-up required.

$ cargo install repotoire && repotoire analyze .

Open source · MIT License · Works offline