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.
npx skills add sickn33/agentic-awesome-skills --skill git-hooks-automation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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-ms
- When to Use This Skill
- Git Hooks Fundamentals
- Hook Types & When They Fire
- Native Git Hooks (No Framework)
- Husky + lint-staged (Node.js Projects)
- Quick Setup (Husky v9+)
- Configure lint-staged in package.json
- Add Commit Message Linting
- Add Pre-Push Hook
- Complete Husky Directory Structure
- pre-commit Framework (Python / Polyglot)
- Setup
- Key Commands
- Custom Hook Scripts (Any Language)
Create a pre-commit hook manually cat > .git/hooks/pre-commit << 'EOF' chmod +x .git/hooks/pre-commit Install npm install --save-dev husky lint-staged Initialize Husky (creates .husky/ directory) npx husky init The init command creates a pre-commit hook — edit it: echo "npx lint-staged" > .husky/pre-commit Install commitlint
What does the git-hooks-automation skill do?
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.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill git-hooks-automation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.