husky

Install and maintain Husky git hooks in Node.js projects.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/trystan2k/padelbuddy --skill husky-trystan2k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: husky
Source: https://github.com/trystan2k/padelbuddy/tree/main/.opencode/skills/husky
Command: npx skills add https://github.com/trystan2k/padelbuddy --skill husky-trystan2k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams install, configure, and maintain Husky git hooks in Node.js projects, ensuring hooks run reliably across contributors and environments.

Core Features & Use Cases

  • Initial setup: initialize Husky in new or existing projects and create a working .husky/ directory.
  • Hook management: create and configure hooks like pre-commit, commit-msg, and pre-push, ensuring they are executable.
  • Migration guidance: handle differences between Husky v8 and v9, including prepare script behavior and auto-install semantics.
  • Auto-installation: ensure hooks are (re-)installed during npm install via prepare, enabling consistent contributor experiences.

Quick Start

Install Husky in your project and run the initialization command to set up the hooks.

Frequently Asked Questions about husky

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Husky git hooks in an existing Node.js project?

To set up Husky git hooks in a Node.js project, initialize Husky to create a working .husky/ directory, then configure a prepare script in package.json to ensure hooks are automatically installed for all contributors.

How do I migrate git hooks between Husky v8 and v9?

Migrating git hooks between Husky v8 and v9 requires adjusting the prepare script behavior and auto-install semantics, as Husky v9 changed how hooks are structured and executed within the .husky/ directory.

Why are my git hooks not running for other contributors in Node.js?

Git hooks may not run for other contributors if the prepare script is missing from package.json, preventing Husky from automatically reinstalling hooks during npm install and causing inconsistent execution environments.

What is the best way to configure pre-commit and commit-msg hooks with Husky?

The best way to configure pre-commit and commit-msg hooks with Husky is to create them inside the .husky/ directory and ensure they are executable, allowing reliable hook execution across different environments.

Does Husky work with Node.js projects to automate git hook installation?

Husky works with Node.js projects by using the prepare script to install and maintain git hooks automatically during npm install, ensuring consistent hook execution across all contributors and environments.