pre-commit

Run repository pre-commit lint, build, and test checks on changed files.

2|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/avav25/ai-assets --skill pre-commit-avav25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit
Source: https://github.com/avav25/ai-assets/tree/main/.windsurf/skills/pre-commit
Command: npx skills add https://github.com/avav25/ai-assets --skill pre-commit-avav25

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeping code changes free from common quality issues by automatically running pre-commit checks before commits or pull requests.

Core Features & Use Cases

  • Command discovery and targeted validation: Reads AGENTS.md, TESTING.md, and config to determine relevant lint, build, and test commands for the changed area.
  • Deterministic execution and feedback: Runs checks in a consistent order and reports pass/fail results with actionable guidance.
  • Automation and quick fixes: Attempts to fix obvious issues and rerun checks, reducing manual iteration during merges.
  • Use Case: Teams aiming to enforce a consistent quality gate across CI workflows to catch issues early.

Quick Start

Run the pre-commit workflow on your current changes to verify lint, build, and test status before committing.

Frequently Asked Questions about pre-commit

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

FAQPage Schema
How do I automate pre-commit checks for linting, building, and testing changed files?

Automating pre-commit checks involves identifying changed files and running targeted lint, build, and test commands on them. This Skill discovers relevant commands from AGENTS.md and config files to execute deterministic validation and report pass/fail results before commits.

How do I run quality checks on changed files before a git commit?

Running quality checks on changed files requires discovering applicable commands from TESTING.md or config files and executing them in a consistent order. This process validates lint, build, and test status for the affected area, providing fast feedback and actionable guidance.

Can I automatically fix linting and build issues before committing code?

Automatically fixing linting and build issues is supported during pre-commit validation. The Skill attempts to resolve obvious issues and reruns the checks, reducing manual iteration and helping developers ship clean code faster.

Does the pre-commit workflow support custom lint and test command discovery?

Custom lint and test command discovery is supported by reading AGENTS.md, TESTING.md, and configuration files. This allows the pre-commit workflow to determine and execute relevant validation commands tailored to the specific changed area.

What is the best way to enforce a consistent code quality gate across CI workflows?

Enforcing a consistent code quality gate across CI workflows is achieved by running deterministic pre-commit checks on changed files. This catches lint, build, and test issues early, providing clear pass/fail reporting and actionable guidance.

Why do I need to run pre-commit checks on changed files instead of the entire repository?

Running pre-commit checks on changed files enables targeted validation, providing faster feedback than full repository checks. This approach ensures only the affected area is linted, built, and tested, catching issues quickly before commits.