lefthook-bypass-guard

Block Git commit and push bypasses of Lefthook hooks.

49|15|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/block/proto-fleet --skill lefthook-bypass-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lefthook-bypass-guard
Source: https://github.com/block/proto-fleet/tree/main/.claude/skills/lefthook-bypass-guard
Command: npx skills add https://github.com/block/proto-fleet --skill lefthook-bypass-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Lefthook bypass-guard helps prevent risky development practices by discouraging or blocking commands that bypass Lefthook hooks configured in Lefthook.yml. Pre-commit hooks (formatting, lint, ruff, buf-lint) and pre-push hooks (typecheck, golangci-lint) catch real problems; bypassing them shifts the failure to CI and produces noisier PRs.

Core Features & Use Cases

  • Enforce awareness when attempting to bypass Lefthook hooks during commits or pushes.
  • Provide guidance to fix the underlying hook configuration or environment issues.
  • Use case: when a developer tries to bypass hooks via git commit --no-verify, the guard prompts correction and preserves pipeline quality.

Quick Start

Enable lefthook-bypass-guard in your repository to warn on any bypass attempt of Lefthook during git operations.

Frequently Asked Questions about lefthook-bypass-guard

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

FAQPage Schema
How do I prevent bypassing Lefthook hooks during git commits?

To prevent bypassing Lefthook hooks during git commits, enable a guard mechanism that detects attempts to skip checks and prompts correction. This preserves pipeline quality by enforcing pre-commit and pre-push hook configurations before operations complete.

What happens when a developer uses git commit --no-verify with Lefthook configured?

When a developer uses git commit --no-verify with Lefthook configured, a guard intercepts the bypass attempt and enforces awareness. It guides the user to fix underlying hook configuration or environment issues instead of allowing the commit to proceed unchecked.

Why should I block Lefthook bypass attempts in my development workflow?

You should block Lefthook bypass attempts because bypassing pre-commit and pre-push hooks shifts failures to CI and produces noisier PRs. Enforcing guardrails ensures formatting, lint, and typecheck checks run locally before pushing code.

Does Lefthook bypass guard support both pre-commit and pre-push hooks?

Yes, Lefthook bypass guard applies to common Git workflows including both pre-commit and pre-push actions. It enforces guardrails across development teams for hooks configured in Lefthook.yml, covering formatting, lint, and typecheck operations.

How do I fix Lefthook hook configuration issues that cause bypass attempts?

To fix Lefthook hook configuration issues that cause bypass attempts, follow the guidance provided by the guard when a bypass is intercepted. The guard prompts correction and directs users to resolve underlying environment or configuration problems.