git-hooks_skill

This skill helps you set up and enforce Git pre-commit hooks for code quality, secrets scanning, and commit message validation.
  • TypeScript

1

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill autumnsgrove/groveengine --skill git-hooks

  • SKILL.md4.8 KB

Overview

This skill sets up and configures Git pre-commit and related hooks to enforce code quality, scan for secrets, and validate commit messages. It provides reusable hooks for TypeScript, Python, Go, multi-language projects, and automation hooks like pre-push and post-commit. Use it to standardize commit practices and prevent accidental secrets or style regressions across a multi-tenant blog platform.

How this skill works

The skill installs hook scripts into .git/hooks and wires them to run linters, formatters, secret scanners, and test suites on staged files or before push. Core hooks validate conventional commit messages and scan for API keys or tokens. Language-specific hooks run tools like Prettier, ESLint, Black, Ruff, and gofmt; automation hooks run tests and update dependencies on branch switch.

When to use it

  • Initial repository setup or onboarding new developers
  • Enforcing conventional commit messages and changelog accuracy
  • Preventing accidental commit of secrets and API keys
  • Running linters/formatters on staged TypeScript and Python files
  • Running tests before pushing to remote to avoid broken builds

Best practices

  • Install a secrets scanner on every repository and fail the commit if secrets are detected
  • Use commit-msg hook to enforce conventional commit format for consistent history
  • Run tests in pre-push to catch regressions before CI
  • Make hooks executable and test them locally (bash -x .git/hooks/pre-commit)
  • Avoid --no-verify except for true emergencies and document exceptions

Example use cases

  • TypeScript service: commit-msg + pre-commit-javascript + pre-commit-secrets-scanner + pre-push
  • Mixed repo: pre-commit-multi-language to auto-detect modified files and run appropriate tools
  • CI safety: pre-push runs the full test suite to reduce flaky CI failures
  • Secrets protection: pre-commit-secrets-scanner rejects commits containing OpenAI, AWS, or GitHub tokens
  • Developer onboarding: provide an installer script to copy and enable hooks automatically

FAQ

Run the provided interactive installer script or copy the relevant scripts into .git/hooks and chmod +x them.

What if a required tool is missing on a developer machine?

Document required dev dependencies and add checks in hooks or the installer; provide commands to install tools (for example uv add --dev black ruff or npm/pnpm install).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational