pre-commit

Automate linting, formatting, type checking, and testing before git commits.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates manual oversight in code quality by enforcing a standardized validation pipeline before any git commit is finalized.

Core Features & Use Cases

  • Automated Quality Gates: Automatically runs linters, formatters, and test suites based on the project's specific technology stack.
  • Error Prevention: Blocks commits that fail type checks or unit tests, ensuring only stable code enters the repository.
  • Use Case: Before pushing a feature, use this skill to automatically format your TypeScript files, run Vitest tests, and verify that no linting errors remain, preventing broken builds in CI.

Quick Start

Run the pre-commit skill to validate your staged changes and prepare them for a clean git commit.

Frequently Asked Questions about pre-commit

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

FAQPage Schema
How do I automate linting and testing before a git commit?

Automating linting and testing before a git commit requires a validation pipeline that detects project configurations and blocks the operation on failure. This skill executes those formatting and testing workflows automatically.

Can I enforce code quality gates for a multi-language repository?

Yes, you can enforce code quality gates for multi-language repositories. This skill supports TypeScript, Python, Java, and Go environments by detecting project-specific configurations to run appropriate validation steps.

What is the best way to prevent broken code from entering version control?

The best way to prevent broken code from entering version control is to block commits that fail type checks or unit tests. This skill enforces mandatory validation steps ensuring only stable code reaches the repository.

How does automated formatting work for TypeScript staged changes?

Automated formatting for TypeScript staged changes works by detecting project configurations and executing the appropriate formatter. This skill formats files and verifies no linting errors remain before finalizing the commit.

Does this automated validation work with Vitest and CI pipelines?

Yes, this automated validation works with Vitest and CI pipelines. It runs test suites before the git commit to prevent broken builds in CI, ensuring code parity and quality standards are met locally first.

Why should I use a pre-commit hook instead of waiting for CI testing?

Using a pre-commit hook instead of waiting for CI testing catches errors locally before version control integration. It runs linting, type checking, and unit tests early, preventing broken builds and saving CI resources.