prek
Installation
SKILL.md
Prek — Pre-commit Formatter Setup
prek is a fast, Rust-native drop-in alternative to
pre-commit. It reads prek.toml and runs formatters automatically on staged
files at commit time.
Formatters — all use 4 spaces, no tabs, line-length 120:
- Python: ruff-check --fix + ruff-format (via astral-sh/ruff-pre-commit)
- SQL:
uv run sqlfmt(local hook) - TypeScript/JS:
bunx --bun @biomejs/biome check --write(local hook, also lints and organizes imports) - YAML: builtin check-yaml (if .yaml/.yml files present)
- File-size guard:
scripts/check_files.py(local hook, always included) — blocks commits containing files over a per-extension line-count limit, and (for.sql) forbidden join patterns. BMS convention, seen in mdmapp and OneSales.