← all checks

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

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

How many repos use pre-commit hooks?

Of the 401 repos on the leaderboard, 115 pass in full (29%), 0 pass in part (0%) and 286 fail (71%).

Why do pre-commit hooks help AI coding agents?

A hook runs the formatter and linter at commit time, so an agent learns of a problem in seconds rather than minutes later from a failed CI run.

What counts as pre-commit hooks?

  • 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.

How checks become a score: methodology.

How do I add pre-commit hooks to my repo?

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

Which AI coding agents weigh pre-commit hooks most?

Pass rate by language

Top-scoring repos that pass

Popular repos that fail it

Every check, grouped into what to do first: how to make your repo ready for AI coding agents.