prek
Installation
SKILL.md
prek — Fast Pre-commit Hook Runner
prek is a fast Git hook manager and pre-commit-compatible runner. It can use native prek.toml configuration or existing .pre-commit-config.yaml files.
Critical Rules for Agents
- Run hooks on all files in CI. Use
prek run --all-filesso CI checks the full repository, not only staged changes. - Use
prek runlocally for staged changes. That mirrors normal pre-commit behavior. - Validate config after editing. Run
prek validate-config prek.tomlor validate the selected config file. - Prefer local hooks for project recipes. Use
repo = "local"when invokingjust,rumdl, tests, or other repo-owned commands. - Keep hooks non-interactive. Git hooks and CI must not prompt for input, open editors, or require TTY workflows.
Install
# uv / uvx
uv tool install prek
uvx prek run --all-files