# Git hooks for your repo (/git--git-hooks)

/git--git-hooks is a Claude Code skill in the Code section. Sets up git hooks that lint staged files, validate commit messages and can run fast tests before push, using the hook manager that fits your stack.

- Web version: https://skills.sgomez.dev/en/s/git--git-hooks
- Section: [Code](https://skills.sgomez.dev/en/code.md)
- Author: Santiago Gómez de la Torre
- License: MIT
- Source: https://github.com/sgomez-dev/claude-skills/blob/main/skills/git/git-hooks.md
- Updated 10 Jul 2026

## How to ask for it

- `/git--git-hooks add a hook that runs the linter before every commit`
- `/git--git-hooks set up husky and lint-staged in my project`
- `/git--git-hooks validate that commit messages follow our format`

## Install

macOS · Linux:

```
curl -fsSL https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.sh | bash
```

Windows:

```
irm https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.ps1 | iex
```

Claude Code plugin:

```
/plugin marketplace add sgomez-dev/claude-skills
/plugin install git-skills@claude-skills-collection
```

## Permissions

- Reads: `.git/**`, `**/*`
- Writes: `.husky/**`, `.pre-commit-config.yaml`, `.lintstagedrc*`, `package.json`, `commitlint.config.*`, `.git/hooks/**`
- Runs: `git config`, `npm install`, `npx husky`, `pre-commit install`
- Network: No
- Destructive: No

## Author's description

Set up git hooks - pre-commit, husky, lint-staged, commit-msg validation

- [How we review this](https://skills.sgomez.dev/en/methodology.md)
