Skip to main content

lefthook

Stars0
Forks0
UpdatedJune 25, 2026 at 04:24

Set up, configure, and debug Lefthook, the fast polyglot Git hooks manager. Covers installation (npm, Homebrew, Go, etc.), `lefthook install`, authoring `lefthook.yml` (hooks, the modern `jobs` syntax plus classic `commands`/`scripts`), file-list templates (`{staged_files}`, `{push_files}`, `{all_files}`, positional `{1}`), `glob`/`exclude`/`root` filtering, `parallel` vs `piped` execution, auto-staging linter fixes with `stage_fixed`, `tags`, `skip`/`only` conditions, job `group`s, local overrides (`lefthook-local.yml`), `extends`/`remotes`, and the CLI (`install`, `run`, `add`, `validate`, `dump`). Use whenever the user wants to add or configure Git hooks, run linters/formatters/tests on commit or push, lint staged files, wire up commitlint/eslint/prettier/rubocop, migrate from Husky or pre-commit, or troubleshoot a `lefthook.yml` โ€” even when they don't say "lefthook" by name. Trigger on lefthook, lefthook.yml, git hooks, pre-commit/pre-push/commit-msg hooks, a Husky alternative, or staged-file linting.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
9 files
SKILL.md
readonly