name: pre-commit
binary: pre-commit
aliases: []
category:
- automation
- lint
- test
lang:
- all
platform:
- local
summary: Framework for running repository-defined checks before commits.
homepage: https://github.com/pre-commit/pre-commit
docs: https://pre-commit.com/
detect:
version_args:
- --version
local:
files:
- .pre-commit-config.yaml
dirs: []
package_json:
package_manager_prefixes: []
use_when:
- Run the same checks configured for repository commits
- Verify cross-language formatting, linting, and policy hooks
avoid_when:
- Hook behavior is unknown and may perform writes or network access
risk:
level: medium
effects:
- execute_code
- read_files
- write_files
- network_access
requires_auth: false
destructive: false
confirmation_required_for:
- auto-updating hooks
- running hooks that mutate many files
guardrails:
- Inspect .pre-commit-config.yaml before running unfamiliar hooks.