lefthook
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "lefthook" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-3b8bd30685641e0769a3899c916772d96a5ccb49e9393fcd373da7aa9c6f6e58. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Lefthook: A fast Git hooks manager written in Go. Suited for scenarios that require setting up Git hooks without relying on Node.js, running pre-commit checks in parallel, or seeking a faster alternative to Husky.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: lefthook
description: >-
Fast Git hooks manager written in Go. Use when a user asks to set up Git hooks without Node.js dependency, run parallel pre-commit checks, or find a faster alternative to Husky.
license: Apache-2.0
compatibility: 'Any Git repository, any language'
metadata:
author: terminal-skills
version: 1.0.0
category: development
tags:
- lefthook
- git-hooks
- pre-commit
- lint
- goLefthook
Overview
Lefthook is a fast, polyglot Git hooks manager. Unlike Husky, it doesn't require Node.js — works with any language. Runs hooks in parallel, supports glob patterns, and configures via YAML.
Instructions
Step 1: Install
npm install -D lefthook
npx lefthook install
# Or: brew install lefthook
Step 2: Configure
# lefthook.yml — Git hooks configuration
pre-commit:
parallel: true
commands:
lint:
glob: "*.{ts,tsx,js,jsx}"
run: npx eslint --fix {staged_files}
format:
glob: "*.{ts,tsx,js,jsx,css,md,json}"
run: npx prettier --write {staged_files}
typecheck:
run: npx tsc --noEmit
pre-push:
commands:
test:
run: npm test
commit-msg:
commands:
commitlint:
run: npx commitlint --edit {1}
Guidelines
- Lefthook runs commands in parallel by default — faster than sequential Husky hooks.
- {staged_files} placeholder only passes staged files — no need for lint-staged.
- Works in polyglot repos (Go, Python, Ruby) without Node.js dependency.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 Git 钩子管理功能,解决多语言项目中高效运行预提交检查的需求
- 不依赖 Node.js,适用于 polyglot 仓库,具有广泛实用价值
Highlights
- 触发词精准完整,明确覆盖不依赖 Node.js、并行运行、替代 Husky 等核心场景
Highlights
- 结构清晰,分步骤说明,包含完整配置示例和 Guidelines
Areas to improve
-
缺少错误处理与异常覆盖 Reported severity: Major
未覆盖 lefthook 安装失败、YAML 配置语法错误、命令执行失败等主要异常场景
Recommendation: 建议补充常见错误处理说明,如安装失败回退方案、配置验证方法、命令执行失败处理等
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 28, 29, 30, 41, 44
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.