setup-git-hooks
Installation
SKILL.md
Setup Git Hooks
What This Sets Up
core.hooksPathpointing at a committed.githooks/dir (git built-in, no Husky needed)- lint-staged running Biome on the languages it supports
- Biome config (if missing)
- Prettier for the languages Biome leaves uncovered, only when the user opts in
- typecheck and build scripts in the pre-commit hook
Why not Husky: Husky's only job is copying runners into .git/hooks/. git config core.hooksPath .githooks does the same with zero dependencies. A prepare script sets the config on every npm install, so teammates are covered on clone.
Steps
1. Detect package manager and existing hook tooling
Check for package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn), bun.lockb (bun). Use whichever is present. Default to npm if unclear.
If the repository already uses Husky (a .husky/ directory or prepare: husky), ask the user now, before anything is installed or written, whether to migrate off it or keep Husky and stop here.