pre-commit-guard

Validate staged git changes with linting, type checks, and secret scans.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents risky commits and pull requests by automatically checking code quality, security issues, and repository readiness before changes are shared.

Core Features & Use Cases

  • Pre-Commit Validation: Runs staged-change checks, formatting validation, linting, type checking, and tests to detect problems early.
  • Security and Quality Checks: Scans for secrets, oversized files, debug statements, and invalid commit message formats.
  • Use Case: Before opening a pull request, use this Skill to verify that a Python project is formatted, tested, free of accidental credentials, and ready for review.

Quick Start

Ask the pre-commit-guard skill to verify my staged changes before I create a 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 run pre-commit checks for staged git changes?

Pre-commit checks validate staged git changes by running formatting, linting, type checking, and tests. You can verify your staged changes before creating a commit to detect issues early and prevent unsafe code from reaching the repository.

How does secret scanning work in a pre-commit hook?

Secret scanning in a pre-commit hook analyzes staged files to detect accidental credentials before they are committed. It prevents risky commits by identifying embedded secrets, oversized files, and debug statements in your staged changes.

Can I use pre-commit validation for Python project pull requests?

Yes, pre-commit validation supports Python projects by verifying formatting, running tests, and checking code quality. It ensures your Python project is tested, free of credentials, and ready for review before opening a pull request.

What is the best way to verify commit message format and code quality before pushing?

The best way to verify code quality before pushing is running a pre-commit guard that checks staged changes, validates commit message formats, and scans for secrets. This prevents low-quality commits and ensures repository readiness before submission.

Why do I need pre-commit linting and type checking in my workflow?

Pre-commit linting and type checking are needed to catch code quality issues before changes are shared. They validate formatting, detect type errors, and run tests on staged changes to prevent risky commits from reaching production.

Does pre-commit validation work without external dependencies?

Pre-commit validation can run without external dependencies by using built-in git status checks, secret scanning, and formatting validation. It applies repository quality gates directly to staged changes without requiring additional component installations.