pre-commit-guard

Run lightweight linting and secret scans on staged files before Git commits.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/TrevorPLam/agency --skill pre-commit-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-guard
Source: https://github.com/TrevorPLam/agency/tree/main/.windsurf/skills/pre-commit-guard
Command: npx skills add https://github.com/TrevorPLam/agency --skill pre-commit-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates lightweight pre-commit validations to prevent common issues and secret leakage from entering the codebase.

Core Features & Use Cases

  • Lightweight checks: fast linting and secret scans run on staged files to catch issues early.
  • Safe workflow integration: works with Git hooks and the Cascade Hook setup to guard commits.
  • Use Case: before committing, ensure code quality and no secrets are embedded.

Quick Start

Run the pre-commit guard to automatically validate staged changes before you 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 secrets from leaking when committing code with git?

To prevent secret leakage during a git commit, you can use pre-commit hooks to run secret scans on staged files. This catches sensitive data before it enters the codebase. The checks restrict to lightweight scanning for safety.

What are pre-commit hooks and how do they catch code issues early?

Pre-commit hooks are scripts triggered before a commit is finalized, running fast checks on staged and recently changed files. They catch issues early by applying lightweight linting and secret scanning to prevent faulty code from entering the repository.

How do I set up fast linting checks to run before a git commit?

Set up fast linting checks before a git commit by integrating a pre-commit guard with your Git hooks. This automates lightweight validations on staged files, ensuring code quality and preventing issues early without slowing down your workflow.

Can I use pre-commit hooks with the Cascade Hook setup to guard my commits?

Yes, pre-commit guards work safely with Git hooks and the Cascade Hook setup to guard commits. This integration ensures that lightweight linting and secret scans run automatically on staged changes before the commit is finalized.

Does pre-commit secret scanning slow down my git workflow?

Pre-commit secret scanning does not slow down your git workflow because it restricts checks to lightweight linting and scanning of only staged files. This design satisfies requirements for fast execution and deterministic behavior before commit.

What is the best way to scan staged files for sensitive data before committing?

The best way to scan staged files for sensitive data is using a pre-commit guard that runs fast secret scans before a commit. It targets recently changed files to catch issues early, ensuring safety and deterministic behavior without heavy processing.