husky-hooks-generator_skill

This skill generates Husky Git hooks for pre-commit, pre-push, and commit-msg as shell scripts compatible with Husky 9.x.
  • TypeScript

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill ehtbanton/claudeskillsrepo --skill husky-hooks-generator

  • SKILL.md714 B

Overview

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.

How this skill works

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.

When to use it

  • Setting up a new repository and you need standard Git hooks for quality checks
  • Enforcing linting and tests automatically before commits or pushes
  • Validating commit message format with commit-msg hook
  • Automating CI-early checks locally to reduce failing builds
  • Quickly scaffolding Husky hooks for TypeScript/Node projects

Best practices

  • Keep hook scripts small and fast; prefer running lightweight checks locally and deferring heavier tasks to CI
  • Use lint-staged in pre-commit to run linters only on staged files for speed
  • Validate commit messages with a linter (e.g., commitlint) in commit-msg to enforce consistent history
  • Avoid blocking developer workflows with long-running tests in pre-push; run full test suites in CI
  • Make generated hooks idempotent and include clear comments so maintainers can adapt commands

Example use cases

  • Create .husky/pre-commit that runs lint-staged and npm test for TypeScript projects
  • Generate .husky/commit-msg to run commitlint --edit $1 and enforce Conventional Commits
  • Produce .husky/pre-push to run a fast subset of tests or a build verification before pushing
  • Scaffold hooks for new contributors so their commits meet repository standards immediately

FAQ

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.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
husky-hooks-generator skill by ehtbanton/claudeskillsrepo | VeilStrat