Agent skill · software engineering · sickn33
git-hooks-automation
Master Git hooks setup with Husky, lint-staged, pre-commit framework, and commitlint. Automate code quality gates, formatting, linting, and commit message enforcement before code reaches CI.
Why this skill is useful
Adds specific commands and configurations for setting up Git hooks with Husky and lint-staged that the AI wouldn't reliably generate on its own.
What it needs
Requires husky, lint-staged installed locally. About 7k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
Git Hooks Automation Automate code quality enforcement at the Git level. Set up hooks that lint, format, test, and validate before commits and pushes ever reach your CI pipeline — catching issues in seconds instead of minutes. When to Use This Skill User asks to "set up git hooks" or "add pre-commit hooks" Configuring Husky, lint-staged, or the pre-commit framework Enforcing commit message conventions (Conventional Commits, commitlint) Automating linting, formatting, or type-checking before commits Setting up pre-push hooks for test runners Migrating from Husky v4 to v9+ or adopting hooks from scratch User mentions "pre-commit", "commit-msg", "pre-push", "lint-staged", or "githooks" Git Hooks Fundamentals Git hooks are scripts that run automatically at specific points in the Git workflow. They live in .git/hooks/ and are not version-controlled by default — which is why tools like Husky exist. Hook Types & When They Fire Hook Fires When Common Use --- --- --- pre-commit Before commit is created Lint, format, type-check staged files prepare-commit-msg After default msg, before editor Auto-populate commit templates commit-msg After user writes commit message Enforce commit message format post-commit After commit is created Notifications, logging pre-push Before push to remote Run tests, check branch policies pre-rebase Before rebase starts Prevent rebase on protected branches post-merge After merge completes Install deps, run migrations post-checkout After checkout/switch Install deps, rebuild assets Native Git Hooks (No Framework) Problem: .git/hooks/ is local-only and not shared with the team. Use a framework instead. Husky + lint-staged (Node.js Projects) The modern standard for JavaScript/TypeScript projects. Husky manages Git hooks; lint-staged runs commands only on staged files for speed. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/git-hooks-automation--ac7b47