prek

Configure Git hooks with prek for formatting, linting, and validation checks.

484|76|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/bastani-inc/atomic --skill prek-bastani-inc
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: prek
Source: https://github.com/bastani-inc/atomic/tree/main/.agents/skills/prek
Command: npx skills add https://github.com/bastani-inc/atomic --skill prek-bastani-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

prek replaces slow, inconsistent pre-commit workflows with a fast, Rust-based way to run the same repository checks before commits or on demand.

Core Features & Use Cases

  • Install and run Git hook shims for pre-commit, pre-push, and commit-msg.
  • Manage formatting, linting, validation, security checks, and custom repository rules.
  • Handle new setups, migrations from pre-commit, monorepos, and workspace-aware configurations.
  • Use case: a team can standardize YAML, JSON, and Rust checks across multiple projects while keeping hook execution fast and reproducible.

Quick Start

Ask the skill to set up a prek-based hook configuration for a repository, including installation, validation, and a recommended first hook set.

Frequently Asked Questions about prek

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Git hooks for linting and formatting checks?ā–¼

Git hooks for linting and formatting are configured using prek to install hook shims for pre-commit and pre-push. This enforces repository checks across commits, requiring a TOML or pre-commit-compatible configuration to define and validate the hook execution rules.

What is the best way to migrate pre-commit configurations to a faster workflow?ā–¼

Migrating pre-commit configurations to a faster workflow involves using prek, a Rust-based alternative that runs the same repository checks. It accepts pre-commit-compatible configuration files, allowing you to retain existing hook definitions while improving execution speed and reliability.

Can I use prek for Git hooks in a monorepo with multiple projects?ā–¼

Yes, prek supports monorepos and workspace-aware configurations for Git hooks. You can standardize formatting, linting, and custom repository rules across multiple projects within the workspace, keeping hook execution fast and reproducible for each specific project context.

Does prek support commit-msg and pre-push hooks in addition to pre-commit?ā–¼

Yes, prek installs and runs Git hook shims for pre-commit, pre-push, and commit-msg. This allows you to manage formatting, linting, validation, security checks, and custom repository rules across different stages of the Git commit and push workflow.

Why use a Rust-based tool like prek instead of standard pre-commit workflows?ā–¼

A Rust-based tool like prek replaces slow pre-commit workflows with fast, reproducible hook execution. It handles workspace-aware execution and built-in validation commands, ensuring reliable repository checks without the performance overhead of standard pre-commit processing.