setup-pre-commit

Installation
SKILL.md

Setup Pre-Commit Hooks

Invocation Position

This is an infrastructure skill, not a normal feature-delivery stage.

Use /setup-pre-commit when a project needs commit-time formatting, linting, type checking, and test hooks.

Do not use it as part of the default feature pipeline. It prepares the repo so later /execute and /pre-merge steps have stronger feedback loops.

What This Sets Up

  • Lefthook for git hook management (fast, zero-dependency, config-as-code)
  • Formatting + linting on staged files (Biome preferred; Prettier, ESLint, or others supported)
  • Typecheck and test scripts in the pre-commit hook
  • Secret scan on staged changes in the pre-commit hook (gitleaks, unless the repo already runs a scanner)
  • Dependency audit in the pre-push hook, using the detected package manager's own audit command

Steps

Installs
30
GitHub Stars
4
First Seen
Apr 7, 2026