Git Hooks Manager

intermediatedevelopmentMin 8K context

Sets up and maintains Git hooks for a repository. Recommends a manager (Husky, Lefthook, or pre-commit), wires up pre-commit and commit-msg hooks for linting, formatting, type checks, secret scanning, and conventional-commit validation, and keeps hooks fast with staged-file filtering. Produces config plus a short contributor guide.

Use Cases

  • Adding pre-commit lint, format, and type-check hooks
  • Enforcing conventional commit messages via commit-msg
  • Running secret scanning before commits land
  • Keeping hooks fast by only checking staged files

Example Prompt

Set up Git hooks for a TypeScript monorepo using pnpm.

Requirements:
- pre-commit: run ESLint + Prettier on staged files only, plus a secret scan
- pre-push: run type-check and affected unit tests
- commit-msg: enforce Conventional Commits

Recommend a hook manager with a brief rationale, provide the full config, ensure hooks are
fast on large repos, and add a short CONTRIBUTING note explaining how to bypass in emergencies.

Recommended Models

Compatible Tools

claude-codecursorgithub-copilotkiroany

Modalities

Input: text, code
Output: text, code

Related Skills

Author

OpenModels Community

@openmodelsrun
Git Hooks Manager — AI Agent Skill | OpenModels