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.

Evaluated Mar 06, 2026 (0d ago) v9.x
Homepage ↗ Repo ↗ Developer Tools git hooks pre-commit commit-msg automation linting npm javascript
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
97
/ 100
Is it safe for agents?
⚡ Reliability
86
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
80
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
85
Secret Handling
95

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

Uptime/SLA
100
Version Stability
82
Breaking Changes
75
Error Recovery
85
AF Security 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

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
No
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local tool — no authentication. Operates entirely within the local Git repository.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Husky is MIT open source by typicode (also created json-server, lowdb). Free for personal and commercial use.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

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.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered