smaqit.infrastructure-hook-pre-commit-validate

Validate staged git files for secrets, .env files, and large files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ruifrvaz/local-image-generator --skill smaqit-infrastructure-hook-pre-commit-validate
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: smaqit.infrastructure-hook-pre-commit-validate
Source: https://github.com/ruifrvaz/local-image-generator/tree/main/.github/skills/smaqit.infrastructure-hook-pre-commit-validate
Command: npx skills add https://github.com/ruifrvaz/local-image-generator --skill smaqit-infrastructure-hook-pre-commit-validate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers catch issues such as .env files, plaintext secrets, draft specs on main/merge, and large files before they are committed to the repository, ensuring code quality and security.

Core Features & Use Cases

  • Pre-commit Validation: Performs checks on staged files to prevent common issues like sensitive data exposure and large files from being committed.
  • Automated Hook: Sets up a git pre-commit hook to run these checks automatically on every commit.
  • Customizable: Allows for additional checks and custom logic to be added for specific project needs.

Quick Start

Run the install.sh script from the scripts/ directory to set up the pre-commit hook.

Frequently Asked Questions about smaqit.infrastructure-hook-pre-commit-validate

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

FAQPage Schema
How do I prevent .env files and plaintext secrets from being committed to my git repository?▼

You can prevent large files and sensitive data exposure by running an install script that sets up an automated pre-commit hook, validating staged files before they enter your git repository.

What does a pre-commit hook check for to ensure code quality?▼

A pre-commit hook checks staged files for plaintext secrets, .env files, draft specs on main or merge branches, and large files to ensure code quality and repository security.

How do I set up automated pre-commit validation for my git repository?▼

Run the install.sh script from the scripts directory to set up the automated git pre-commit hook, which will run validation checks on your staged files automatically on every commit.

Can I add custom validation checks to my git pre-commit hook?▼

Yes, the pre-commit validation is customizable and allows you to add additional checks and custom logic to meet specific project requirements beyond the default sensitive data and large file checks.

Do I need any external dependencies to run pre-commit validation on staged files?▼

No external dependencies are required; the automated pre-commit validation relies solely on setting up the git pre-commit hook using the included scripts, requiring only a standard git repository environment.