Husky
The most popular Git hooks manager for Node.js projects. Husky makes it simple to add Git hooks (pre-commit, commit-msg, pre-push, etc.) to a project via package.json configuration. Used to run linters, formatters, tests, and validators automatically before commits or pushes. Powers the standard JavaScript/TypeScript project quality gate: Husky + lint-staged + ESLint/Prettier + commitlint.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Local tool — no network access during hook execution. Hook scripts are plain shell — audit .husky/ directory for unexpected commands. MIT licensed by trusted author.
⚡ Reliability
Best When
You have a Node.js/JavaScript project and want the easiest, most community-standard setup for Git hooks — Husky is the default choice.
Avoid When
You need language-agnostic Git hooks, faster hook execution, or want Git-committable hook configurations — use Lefthook instead.
Use Cases
- • Run ESLint and Prettier automatically on staged files before every commit using Husky pre-commit hook + lint-staged
- • Enforce commit message format using Husky commit-msg hook running commitlint to validate Conventional Commits
- • Block commits with failing tests using Husky pre-commit hook running a subset of fast unit tests
- • Run TypeScript type checking before push using Husky pre-push hook to catch type errors before CI
- • Automate code quality enforcement in team projects without requiring developers to manually run formatters
Not For
- • Non-Node.js projects — Husky requires npm/Node.js for installation; use Lefthook for language-agnostic Git hooks
- • Projects where Git hook bypass (--no-verify) is common — team discipline needed for hooks to be effective
- • High-performance hook execution — Husky adds Node.js startup overhead; Go-based Lefthook is faster
Interface
Authentication
Local tool — no authentication. Operates entirely within the local Git repository.
Pricing
Husky is MIT open source by typicode (also created json-server, lowdb). Free for personal and commercial use.
Agent Metadata
Known Gotchas
- ⚠ Husky 9.x changed initialization — requires 'husky init' (not 'npx husky install') and hooks live in .husky/ directory, not .git/hooks; Husky 8.x scripts do NOT work in 9.x
- ⚠ Hooks don't run in CI/CD by default unless Git hooks are properly set up — Husky uses 'prepare' npm script which only runs on npm install, not in most CI environments
- ⚠ Git bypass is always possible with --no-verify flag — Husky cannot enforce hooks if developers or agents use --no-verify; enforce checks in CI as backup
- ⚠ Husky requires hooks to be executable — on Windows, file permissions may not be set correctly after git clone; husky init handles this but manual hook files may fail
- ⚠ Hook scripts in .husky/ must have shebangs (#!/usr/bin/env sh) and be shell-executable — forgetting shebangs causes 'not an executable' errors on Linux
- ⚠ Husky hooks don't run if npm dependencies aren't installed — in agent environments doing a fresh git clone, run 'npm install' before expecting hooks to work
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Husky.
Scores are editorial opinions as of 2026-03-06.