← all checks

Pre-commit hooks: catching AI coding agent mistakes before CI

This check looks for a git hook framework configured in the repo: pre-commit (.pre-commit-config.yaml), Husky (.husky/) or Lefthook (lefthook.yml).

How many repos pass

Of the 371 repos on the leaderboard, 114 pass in full (31%), 0 pass in part (0%) and 257 fail (69%).

Why agents need it

A hook runs the formatter and linter at commit time, so an agent hears about a problem in seconds. Without hooks the same problem surfaces minutes later as a failed CI run, and the agent spends another round fixing it.

How we score it

  • Full pass: a config for pre-commit, Husky or Lefthook.
  • Fail: none. Hooks set up any other way, such as a script that writes to .git/hooks, are not detected.

The methodology has the formula that turns checks into a score.

How to pass

Add one of the three frameworks and have it run the formatter and linter on staged files. Keep the hook fast; slow checks belong in CI.

Which agents count it most

Pass rate by language

Top-scoring repos that pass

Popular repos that fail it