husky

Automate Git hooks with Husky for pre-commit, commit-msg, and pre-push actions.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/messeb/skills --skill husky-messeb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: husky
Source: https://github.com/messeb/skills/tree/main/plugins/general-developer/skills/husky
Command: npx skills add https://github.com/messeb/skills --skill husky-messeb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines your Git workflow by automating pre-commit and pre-push checks, ensuring code quality and consistency before changes are committed or pushed.

Core Features & Use Cases

  • Automated Linting & Formatting: Ensures code adheres to style guides automatically.
  • Commit Message Validation: Enforces a consistent commit message format (e.g., Conventional Commits).
  • Pre-push Testing: Runs fast tests before pushing to catch issues early.
  • Use Case: Prevent broken code and inconsistent commit messages from entering your repository by setting up Husky to automatically lint staged files and validate commit messages on every commit.

Quick Start

Install Husky and initialize it in your project to set up Git hooks.

Frequently Asked Questions about husky

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

FAQPage Schema
How do I automate git hooks for pre-commit linting and commit message validation?

Automate git hooks by setting up Husky to run pre-commit and commit-msg checks, integrating lint-staged for staged file processing and commitlint to enforce conventional commit message conventions automatically.

What is the best way to enforce conventional commit messages in a local development workflow?

Enforce conventional commit messages by configuring commitlint with Husky's commit-msg hook, ensuring local development workflows maintain commit message consistency and CI parity before changes are pushed.

Does Husky work with monorepo configurations for pre-push testing?

Yes, Husky supports monorepo configurations for pre-push actions, allowing you to run fast tests and catch issues early across multiple packages before pushing changes to the repository.

How do I run lint-staged only on changed files before a commit?

Run lint-staged on changed files by integrating it with Husky's pre-commit hook to automatically lint and format staged files, ensuring code adheres to style guides efficiently without processing the entire repository.

Why should I use pre-commit hooks instead of relying on CI pipelines for code quality?

Pre-commit hooks provide immediate local feedback, preventing broken code and inconsistent commit messages from entering the repository, ensuring CI parity and reducing build failures before changes are pushed.