home / skills / ehtbanton / claudeskillsrepo / husky-hooks-generator
This skill generates Husky Git hooks for pre-commit, pre-push, and commit-msg as shell scripts compatible with Husky 9.x.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill husky-hooks-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: husky-hooks-generator
description: Generate Husky Git hooks for pre-commit, pre-push, and commit-msg automation. Triggers on "create husky hooks", "generate git hooks", "husky setup", "pre-commit hooks".
---
# Husky Hooks Generator
Generate Husky Git hooks for automating code quality checks on commits.
## Output Requirements
**File Output:** `.husky/pre-commit`, `.husky/commit-msg`, `.husky/pre-push`
**Format:** Shell scripts
**Standards:** Husky 9.x
## When Invoked
Immediately generate Husky hook files for the specified automation tasks.
## Example Invocations
**Prompt:** "Create husky hooks for lint and test"
**Output:** Complete `.husky/pre-commit` with lint-staged and test commands.
This skill generates Husky Git hook files for pre-commit, pre-push, and commit-msg automation using Husky 9.x conventions. It produces ready-to-use shell scripts at .husky/pre-commit, .husky/commit-msg, and .husky/pre-push to run linting, tests, commit message validation, or other tasks. Use it to quickly enforce project-level quality gates and developer workflows.
When triggered, the skill creates three shell script files under the .husky directory formatted for Husky 9.x. Each file contains the appropriate shebang and commands to run tools like lint-staged, test runners, and commit message linters; content is tailored to the requested automation (for example, lint + test on pre-commit). The generated hooks are ready to be committed and activated by Husky in the repository.
What files are generated?
The skill generates .husky/pre-commit, .husky/commit-msg, and .husky/pre-push shell scripts formatted for Husky 9.x.
Can I customize the commands inside hooks?
Yes. The generated scripts include commands you can edit to run your preferred linters, test commands, or commit validators.