lefthook

Manage git hooks with declarative YAML and parallel execution.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/nq-rdl/agent-extensions --skill lefthook-nq-rdl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lefthook
Source: https://github.com/nq-rdl/agent-extensions/tree/main/skills/lefthook
Command: npx skills add https://github.com/nq-rdl/agent-extensions --skill lefthook-nq-rdl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git hooks management with Lefthook. Use when writing or reviewing git hook configuration for Go projects, polyglot repos, or any project where Node.js is not already in the toolchain. Also trigger on mentions of 'lefthook', 'lefthook.yml', 'lefthook install', parallel git hooks, or when the user asks which git hooks tool to use (husky vs lefthook). For Node.js/Bun projects that already have a JS runtime, see the husky skill instead.

Core Features & Use Cases

  • Declarative YAML-based hook definitions (pre-commit, pre-push, etc.)
  • Parallel execution by default and monorepo root support
  • Go/vet/lint integration and language-agnostic tooling
  • Use Case: In a Go monorepo, run format, vet, and lint across modules in parallel.

Quick Start

Install Lefthook and run lefthook install in your project to enable fast, parallel git hooks.

Frequently Asked Questions about lefthook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage git hooks in a polyglot monorepo without Node.js?

Git hooks in a polyglot monorepo can be managed using a single-binary tool like Lefthook. It provides declarative YAML configuration for hooks and supports root-dir execution, eliminating the need for a Node.js runtime in your toolchain.

What is the best way to run pre-commit hooks in parallel across multiple languages?

Running pre-commit hooks in parallel across multiple languages is handled natively by Lefthook. It uses declarative YAML definitions to execute jobs concurrently, supporting Go, Python, Ruby, and mixed-language repositories by default.

Does Lefthook work with Go projects for linting and vetting?

Lefthook works with Go projects by integrating go vet and lint tools directly into its hook definitions. It allows you to run these checks across multiple modules in parallel before commits are finalized.

How do I set up local overrides for git hooks in a monorepo?

Local overrides for git hooks in a monorepo are supported through Lefthook's declarative YAML configuration. You can define root-directory support and apply tag filters to customize hook execution for specific project segments.

When should I choose Lefthook over Husky for git hooks management?

Choose Lefthook over Husky when your project does not already include a Node.js or Bun runtime. Lefthook offers a fast, language-agnostic, single-binary alternative, whereas Husky is suited for JavaScript-based workflows.

Can I use a single binary to handle git hooks for Ruby and Python repositories?

A single binary can handle git hooks for Ruby and Python repositories using Lefthook. It provides language-agnostic tooling that runs format, vet, and lint scripts in parallel without requiring language-specific hook managers.