/prek:prekfrom prek
Use when setting up git pre-commit hooks with prek - writing .pre-commit-config.yaml, installing or running hooks, wiring repo-local checks (fmt, lint, tests), or migrating from Python pre-commit. prek is a fast, single-binary, pre-commit-compatible runner (no Python required).
Ships in prek. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
prek (github.com/j178/prek) reads the same
.pre-commit-config.yaml as Python pre-commit — existing configs work
unchanged. Migration is: install prek, run prek install.
| Via | How |
|---|---|
| mise (preferred) | prek = "latest" under [tools] (registry: aqua:j178/prek) |
| Homebrew | brew install prek |
| cargo | cargo install prek |
Repo-local toolchain commands use repo: local + language: system:
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: fmt
name: cargo fmt (check)
entry: cargo fmt --all --check
language: system
types: [rust]
pass_filenames: false
- id: clippy
name: cargo clippy (-D warnings)
entry: cargo clippy --workspace --all-targets -- -D warnings
language: system
types: [rust]
pass_filenames: false
- id: workspace-lints
name: cargo workspace-lints
entry: cargo workspace-lints
language: system
files: (^|/)Cargo\.toml$
pass_filenames: false
Remote-repo hooks work as in pre-commit; pin rev: to a tag.
prek install # write the git hook (once per clone)
prek run --all-files # run every hook against the whole tree (CI / first run)
Offer a repo task so clones activate consistently, e.g. mise:
[tasks.hooks] run = "prek install".
pass_filenames: false for whole-workspace commands (cargo, tsc, …) —
otherwise the hook receives the staged file list as arguments.files: (regex) instead of types:.language: system runs commands from the committer's PATH — toolchain
managers (mise, rustup) must be active in the git environment.prek run --all-files in CI to gate the
full tree.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub neoeinstein/claude-plugins --plugin prek