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
- Devin6% of its score
- OpenHands6% of its score
- Pi6% of its score
- Kimi CLI6% of its score
- GPT-5 Codex5% of its score
- Claude Code5% of its score
- Gemini CLI5% of its score
- Aider4% of its score
- Cursor4% of its score
Pass rate by language
Top-scoring repos that pass
- Rust · 33.1k ★
- gitlab-org/cli92.7— · 1.1k ★
- apache/superset92.2Python · 75.1k ★
- axios/axios91.9JavaScript · 109.4k ★
- aio-libs/aiohttp91.9Python · 16.6k ★
- C++ · 131k ★
- Rust · 6.7k ★
- TypeScript · 115 ★
- TypeScript · 2 ★
- Python · 46k ★
- scrapy/scrapy90.6Python · 64.8k ★
- Clojure · 49.6k ★
Popular repos that fail it
- react/react66.9JavaScript · 250.9k ★
- microsoft/vscode71.3TypeScript · 193.6k ★
- TypeScript · 190.9k ★
- ollama/ollama80.0Go · 182.9k ★
- flutter/flutter53.5Dart · 180k ★
- Python · 167.6k ★
- Python · 165k ★
- TypeScript · 150.4k ★