lefthook

Enforce Conventional Commits and run Git hooks via Lefthook.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/Hyperxq/modular-frontend-architecture --skill lefthook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lefthook
Source: https://github.com/Hyperxq/modular-frontend-architecture/tree/main/.claude/skills/lefthook
Command: npx skills add https://github.com/Hyperxq/modular-frontend-architecture --skill lefthook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Lefthook Git hooks and Conventional Commits patterns for this project. Trigger: When configuring lefthook.yml, writing commit messages, adding git hooks, or understanding commit conventions.

Core Features & Use Cases

  • Conventional Commit enforcement: ensures commit messages follow the conventional pattern.
  • Hook management: installs and runs pre-commit hooks and commit-msg validations.
  • Onboarding and consistency: ensures hooks are installed after fresh clones and maintained across the repo.

Quick Start

Install Lefthook after cloning to activate the configured Git hooks.

Frequently Asked Questions about lefthook

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

FAQPage Schema
How do I enforce conventional commits with Git hooks?

You can enforce conventional commits by configuring a commit-msg Git hook to validate commit messages against the conventional pattern. This Skill sets up Lefthook to install and run these validations automatically during your commit workflow.

How do I set up pre-commit hooks using Lefthook and Bun?

To set up pre-commit hooks with Lefthook and Bun, you configure a lefthook.yml file and run Lefthook with bunx. This installs the hooks to run lint and format checks automatically before each commit is finalized.

What is the best way to manage Git hooks across a cloned project?

Managing Git hooks across a cloned project requires a centralized configuration file like lefthook.yml. After cloning, running Lefthook with bunx activates the configured hooks, ensuring consistent onboarding and validation across all developer environments.

Do I need Bun to run Lefthook Git hooks?

Yes, you need a Bun-based workflow to run Lefthook Git hooks. This Skill requires Lefthook to execute with bunx, using a Bun environment to install and execute the pre-commit and commit-msg hooks.

Why are my commit messages failing validation in Git?

Commit messages fail validation when they do not follow the conventional commits pattern. A configured commit-msg hook checks the message format against established rules, rejecting any commit that lacks the proper conventional structure.

Can I run lint and format checks automatically before committing?

Yes, you can run lint and format checks automatically before committing by configuring a pre-commit hook. Lefthook manages this process by executing the defined lint and format checks during the pre-commit stage.