# Husky — card for AI agents

Modern Git hooks manager for running tasks on git events.

Category: Dev workflow and config · npm package `husky` · latest version 9.1.7 (checked 2026-11-01)
Install: `npm install husky`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Husky
- Set Husky up through the npm `prepare` script. The site says it "aligns with npm best practices using prepare script."
- Script advanced hook logic in POSIX shell, as the site recommends.
- Any of the 13 client-side Git hooks can be used. The site lists all 13 as supported.
- When a check should apply only to some branches, use branch-specific hooks. They are a listed feature.
- Read the maintainers' articles "Why husky has dropped conventional JS config" and "Why husky doesn't autoinstall anymore" before writing a JS config or expecting hooks to install themselves.

## What it is
- The repository's tagline is "Git hooks made easy". The project dates from 2014-06-23 and is MIT licensed. The website's headline is "Ultra-fast modern native git hooks". It describes the job as follows: "Automatically lint your commit messages, code, and run tests upon committing or pushing."
- The site gives the mechanism in a few lines. Husky "uses new Git feature (core.hooksPath)". It "adheres to Git's native hook organization". It "aligns with npm best practices using prepare script". The feature list covers all 13 client-side Git hooks and branch-specific hooks. It says to use POSIX shell "to script advanced cases".
- The site's support list names macOS, Linux, Windows, Git GUIs, Node version managers, custom hooks directory, nested projects and monorepos. It also links two articles, "Why husky has dropped conventional JS config" and "Why husky doesn't autoinstall anymore". Their titles suggest Husky works differently from its earlier versions.

## Caveats
- The ~1ms figure is unverified here: The "runs in ~1ms" and "fastest" claims come from the project's own website. None of the sources includes an independent measurement.
- JS config and autoinstall were dropped: The site links two articles. One is titled "Why husky has dropped conventional JS config". The other is titled "Why husky doesn't autoinstall anymore". The sources here include only the titles, not what replaced either feature, so anyone used to older setups should read both articles.
- Deprecation warnings exist in v9: The latest release, v9.1.7 (2024-11-18), lists one change: `fix: add husky label to deprecated warning`. The release notes do not say what is deprecated.

## Numbers (AgentGid data)
- Gid Score: 85.5 (#38 of all tools, 3 of 299 in its category)
- Used in 639 public projects set up for AI coding agents (10.2%)
- Downloads last week: 52,196,916 (as of 2026-11-24), +39.8% over 4 weeks
- GitHub stars: 35,400 (as of 2026-11-24)
- Last push: 2026-03-19

## Often used with
lint-staged 68.1%, Prettier 66.0%, ESLint 67.0%, TypeScript 78.2%, Vitest 42.1%, Playwright (JavaScript) 35.2%

## Checked alternatives (same job)
- Lefthook: https://agentgid.com/tools/lefthook/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/husky/
- Homepage: https://github.com/typicode/husky#readme
- Repository: https://github.com/typicode/husky
- Source: https://github.com/typicode/husky
- Source: https://github.com/typicode/husky/releases
- Source: https://typicode.github.io/husky

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
