pre-commit-validation

Automate pre-commit checks and auto-fixes for Python projects using Ruff, Mypy, Pyright, and ShellCheck.

95|3|Updated Oct 25, 2024
One-click install
npx skills add https://github.com/albumentations-team/benchmark --skill pre-commit-validation-albumentations-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-validation
Source: https://github.com/albumentations-team/benchmark/tree/main/.cursor/skills/pre-commit-validation
Command: npx skills add https://github.com/albumentations-team/benchmark --skill pre-commit-validation-albumentations-team

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The pre-commit-validation skill helps ensure code quality by running pre-commit hooks, automatically fixing common issues, and validating type checks before commits.

Core Features & Use Cases

  • Automatically runs pre-commit hooks on changed files.
  • Automatically fixes common lints and formatting issues with ruff, mypy, pyright, and shellcheck.
  • Validates types and enforces project quality standards during the commit workflow.
  • Use case: before pushing code, run the pre-commit suite to catch errors early.

Quick Start

Run pre-commit on all files to immediately catch issues.

Frequently Asked Questions about pre-commit-validation

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

FAQPage Schema
How do I run pre-commit checks on changed files before committing?

Pre-commit hooks automate linting and type checking using Ruff, Mypy, Pyright, and ShellCheck. They validate code quality before commits by catching formatting errors and type issues early, preventing broken code from entering your repository.

Can I automatically fix linting and formatting issues with Ruff and Mypy before a commit?

Yes, you can automatically fix common lints and formatting issues using Ruff, Mypy, Pyright, and ShellCheck. This skill runs these tools during the pre-commit phase to auto-fix errors and enforce project quality standards.

Does pre-commit validation work with both Ruff and Pyright for Python type checking?

Pre-commit validation works with both Ruff and Pyright, alongside Mypy, to validate Python type checking. It integrates these tools into the commit workflow to enforce typing standards across your project.

What's the best way to validate shell scripts and Python types before pushing code?

The best way to validate shell scripts and Python types is running a pre-commit suite with ShellCheck and Mypy. This catches script errors and typing issues locally before pushing code to the repository.

Do I need existing pre-commit configuration to run lint and type checks on all files?

Yes, proper pre-commit configuration is required to run lint and type checks on all files. This skill uses your existing setup to apply Ruff, Mypy, Pyright, and ShellCheck validations across the project.