$npx skillfedfor your agent

pre-commit-hooks

Some out-of-the-box hooks for pre-commit.

Worth itPyPI Quality AssuranceReleased Aug 20251.8M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pre_commit_hooks-6.0.0-py2.py3-none-any.whl
v6.0.0 · released 2025-08-09 · Python >=3.9 · 2 runtime deps: ruamel.yaml, tomli

Yes. pre-commit-hooks is a mature, actively maintained package with low install friction and no known vulnerabilities. It solves a real problem—automating repetitive code quality checks at commit time—and integrates seamlessly into existing pre-commit workflows. The permissive MIT license and broad hook coverage make it a practical choice for most projects.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires pre-commit framework to be installed and initialized in your repository; hooks run as part of the pre-commit workflow, not standalone.
  • Low install friction with only two runtime dependencies (ruamel.yaml and tomli).
  • Actively maintained with a recent release and 6660 repository stars, indicating stable community adoption.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in both open-source and commercial projects with minimal restrictions.

last release 2025-08-09 (370 days) · last repo commit 2026-07-24 · 6,660 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,841,828 downloads/mo, #3,496 on PyPI

Verify before relying

# Add to .pre-commit-config.yaml
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v6.0.0
  hooks:
    - id: trailing-whitespace
    - id: check-yaml
    - id: check-json
  • Whether all hooks work equally well across CPython and PyPy implementations despite both being listed as supported.
  • Performance impact when running multiple hooks on large repositories or with many staged files.
Same gist for agents: .md · .json

What it is and what it does

pre-commit-hooks is a collection of ready-to-use hooks designed to run within the pre-commit framework, catching common issues before code is committed. It provides validators for file syntax (YAML, JSON, XML, TOML), checks for problematic patterns (merge conflicts, debug statements, private keys), enforces file standards (line endings, trailing whitespace, shebangs), and prevents specific mistakes like committing large files or to protected branches.

The package depends on ruamel.yaml and tomli for parsing configuration and data files. It's designed to be dropped into a pre-commit configuration file and requires Python 3.9 or later. Each hook is a standalone command that can be selectively enabled or configured with arguments, making it flexible for different project needs without requiring custom hook development.

Use it for

  • Prevent accidental commits of large binary files or datasets by enforcing a size limit before they reach the repository.
  • Validate YAML and JSON configuration files for syntax errors before they are committed, catching typos early.
  • Detect and block commits containing AWS credentials, private keys, or other sensitive credentials.
  • Enforce consistent file formatting (line endings, trailing whitespace, newline at end of file) across a team.
  • Block direct commits to protected branches like main or production to enforce code review workflows.
  • Check Python files for common mistakes like debug statements or breakpoint() calls left in code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

pre-commit-hooks is a mature, actively maintained package with low install friction and no known vulnerabilities. It solves a real problem—automating repetitive code quality checks at commit time—and integrates seamlessly into existing pre-commit workflows. The permissive MIT license and broad hook coverage make it a practical choice for most projects.

Install

pre-commit-hooks on PyPI

Before you install

Low install friction with only two runtime dependencies (ruamel.yaml and tomli). Actively maintained with a recent release and 6660 repository stars, indicating stable community adoption.

Requires pre-commit framework to be installed and initialized in your repository; hooks run as part of the pre-commit workflow, not standalone.

License in practice

MIT license is permissive, allowing use in both open-source and commercial projects with minimal restrictions.

Quickstart

# Add to .pre-commit-config.yaml
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v6.0.0
  hooks:
    - id: trailing-whitespace
    - id: check-yaml
    - id: check-json

Verify before relying

  • Whether all hooks work equally well across CPython and PyPy implementations despite both being listed as supported.
  • Performance impact when running multiple hooks on large repositories or with many staged files.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
ruamel.yamltomli
MaintenanceActively maintained 370 days since the last release
Last repo commit
First released
Downloads1,841,828 / month, #3,496 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: pre_commit_hooks-6.0.0-py2.py3-none-any.whl

Tags

Capabilities
pre-commit hooksgit hooks for code qualityfile validation hooksyaml json xml syntax checkingprevent large files commitcode linting hooksgit commit checks
Topics
git-workflowcode-qualityautomation

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “file validation hooks”

  • pre-commit-hooksProvides a collection of reusable pre-commit hooks for common code…
  • pre-commitpre-commit is a framework for installing and running git hooks…
  • mkdocs-simple-hooksA MkDocs plugin that lets you define custom hooks directly in your…

Give your agent the search over MCP, or paste the wish link into any chat.

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.

Install it if your test suite takes long enough that parallelization would save meaningful time.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.

Install it if you work with CloudFormation templates.

MIT-0pure Python
114.9Mdownloads / mo

See also pre-commit · check-jsonschema · prek · cfgv · reformat-gherkin · pyinstaller-hooks-contrib · actionlint-py · conventional-pre-commit · ghstack · lefthook