Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Lefthook

$ lefthook Community Low Risk
Evil Martians · Code & DevOps · MIT · macos / linux / windows

A single-binary, zero-dependency Git hooks manager written in Go that runs repo checks in parallel. Supports lefthook dump for inspecting resolved YAML/JSON config and --no-tty for clean headless agent execution.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install lefthook
CLI vs MCP Decision CLI Only

Executes local repo checks directly as subprocesses; MCP adds no value over direct CLI invocation.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports --no-tty, NO_COLOR=1, and lefthook dump --format json, though run output is plain command stdout.

  • lefthook run --no-tty disables interactive spinners
  • lefthook dump --format json prints effective configuration
Trust & Safety 22 / 25

Zero remote auth surface and deterministic local lefthook.yml execution; dump enables pre-flight inspection.

  • Purely local configuration with explicit run targeting
Setup & Portability 15 / 15

Single static Go binary installable via Homebrew, npm, Go, and release tarballs across all major OSes.

  • Fast standalone Go binary with zero runtime dependencies
Utility & Efficiency 13 / 15

Parallel hook execution and glob filtering make monorepo checks significantly faster than sequential runners.

  • Parallel command execution with {staged_files} substitution
Maintenance & Lineage 8 / 10

Actively maintained by Evil Martians under MIT license.

  • Active evilmartians/lefthook repository
Docs & Verifiability 8 / 10

Clear configuration docs at lefthook.dev and concise --help flags.

  • Structured configuration docs at lefthook.dev

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; reads local lefthook.yml and .lefthook-local.yml configuration files.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source Go binary; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Lefthook Agent Rules
- Pass `--no-tty` and set `NO_COLOR=1` when running `lefthook run` in agent shells.
- Use `lefthook dump` to inspect which commands a hook triggers before running it.

Agent-Ready Command Recipes

Safe Read-Only Queries

Dump merged hook configuration
lefthook dump --format json

Prints the effective merged hook configuration in JSON format without running any hooks.

Controlled Writes & Previews

Run pre-commit hooks non-interactively
lefthook run pre-commit --no-tty

Runs configured pre-commit commands across files with interactive TTY progress disabled.

Strengths for Agents

  • + Single Go binary starts instantly and runs polyglot checks in parallel.
  • + --no-tty and NO_COLOR=1 keep agent logs clean.
  • + lefthook dump --format json makes hook inspection trivial.

Caveats & Pitfalls

  • ! lefthook run aggregates raw command output without a JSON test/lint summary.
  • ! Relies on tools already installed in the repo environment (unlike pre-commit auto-envs).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI