pre-commit-guard

Validate staged git changes with security scans, formatting checks, and unit tests.

Updated May 5, 2026
One-click install
npx skills add https://github.com/iani-kuli/harness_bro --skill pre-commit-guard-iani-kuli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-guard
Source: https://github.com/iani-kuli/harness_bro/tree/main/.claude/skills/curated/pre-commit-guard
Command: npx skills add https://github.com/iani-kuli/harness_bro --skill pre-commit-guard-iani-kuli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ruff, mypy, pytest, gitleaks.

What problem does it solve?

This Skill prevents common errors, security vulnerabilities, and code quality issues from entering your repository by enforcing a strict validation sequence before any commit.

Core Features & Use Cases

  • Security & Integrity: Automatically scans for hardcoded secrets, tokens, and large files that should not be committed.
  • Code Quality: Enforces formatting, linting, and type checking using industry-standard tools like ruff and mypy.
  • Use Case: Before pushing a new feature, run this skill to ensure your code is clean, tested, and free of sensitive credentials, maintaining a high standard for your codebase.

Quick Start

Run the pre-commit-guard skill to validate your current staged changes before finalizing your git commit.

Frequently Asked Questions about pre-commit-guard

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

FAQPage Schema
How do I prevent hardcoded secrets and sensitive credentials from being committed to git?

To prevent hardcoded secrets from entering git, you can run an automated pre-commit validation sequence that scans staged changes for exposed credentials using gitleaks and blocks the commit if sensitive data is detected.

How do I enforce ruff formatting and mypy type checking before a git commit?

You can enforce ruff formatting and mypy type checking before a git commit by running an automated validation sequence on your staged changes that executes linting and type checks, blocking commits that fail quality checks.

Does pre-commit quality automation work with pytest unit tests?

Pre-commit quality automation works with pytest by executing unit tests as part of its validation sequence on staged git changes, ensuring all tests pass before the commit is finalized and preventing untested code from entering the repository.

What is the best way to scan staged git changes for large files and security vulnerabilities?

The best way to scan staged changes for large files and vulnerabilities is an automated pre-commit gate that executes security scans, formatting checks, and unit tests locally before finalizing your git commit.

Why should I use an automated pre-commit gate instead of running linters and tests manually?

An automated pre-commit gate prevents common errors and security vulnerabilities from entering your repository by enforcing a strict, consistent validation sequence, eliminating the risk of human error associated with running linters and tests manually.

Can I run pre-commit validation checks in my local development environment?

You can run pre-commit validation checks in your local development environment, as the process operates locally to validate staged git changes by executing security scans, formatting checks, and unit tests before finalizing the commit.