Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

prek

$ prek Community Low Risk
j178 · Code & DevOps · MIT · macos / linux / windows

Single-binary Rust reimplementation of pre-commit that runs Git hooks from .pre-commit-config.yaml or prek.toml without a Python runtime. Supports workspace monorepos, tag filtering, and fast hook caching, with non-interactive prek run execution.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install prek
CLI vs MCP Decision CLI Only

Runs local workspace linters and formatters directly against files; CLI execution is vastly faster and lower-overhead than MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Deterministic non-TTY prek run, --color=never, --show-diff-on-failure, and strict config validation, though it lacks native --json summary output.

  • Supports --color=never, --all-files, and --show-diff-on-failure
  • Outputs human-readable pass/fail hook logs rather than JSON
Trust & Safety 21 / 25

Operates locally in the repo, though executing third-party hook repos from .pre-commit-config.yaml can run arbitrary hook scripts and format files in place.

  • Hook execution inherits write permissions of configured project hooks
Setup & Portability 15 / 15

Single Rust binary with no Python dependency for prek itself, available via Homebrew, Cargo, and GitHub Releases.

  • Zero-dependency Rust binary across macOS, Linux, and Windows
Utility & Efficiency 14 / 15

Dramatically faster startup and built-in monorepo workspace support compared to Python pre-commit.

  • Drop-in .pre-commit-config.yaml compatibility with faster Rust orchestration
Maintenance & Lineage 8 / 10

Actively developed open-source project (j178/prek) under MIT license.

  • Active MIT-licensed repository
Docs & Verifiability 9 / 10

Clear documentation site (prek.j178.dev) detailing differences from pre-commit, workspace mode, and CLI flags.

  • Official docs site at prek.j178.dev

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Stores cached hook toolchains locally; uses Git credentials only when fetching hook repositories.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source Rust binary; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# prek Agent Rules
- Run `prek run --all-files --color=never` (or pass specific files) before finalizing commits, as hooks may auto-format files.
- Remember that hooks defined in `.pre-commit-config.yaml` can modify staged/working files in place.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate hook configuration and list configured hooks
prek validate-config

Checks .pre-commit-config.yaml syntax strictly without executing or modifying files.

Controlled Writes & Previews

Run configured hooks across all repository files
prek run --all-files --show-diff-on-failure --color=never

Executes project hooks non-interactively with ANSI colors disabled and prints diffs if auto-formatting hooks modify files.

Strengths for Agents

  • + Drop-in .pre-commit-config.yaml runner with single-binary Rust speed and no Python bootstrap required.
  • + --show-diff-on-failure and --color=never give agents clean diagnostic feedback when a hook rejects or edits files.

Caveats & Pitfalls

  • ! No --json output mode for hook results; agents parse stdout/exit codes.
  • ! Formatter hooks run via prek run mutate working-tree files in place.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI