Skip to main content

lefthook

星标0
分支0
更新时间2026年6月25日 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.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

文件资源管理器
9 个文件
SKILL.md
readonly