precommit

Run precommit checks on code changes and report failures.

14|4|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/motlin/claude-code-plugins --skill precommit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: precommit
Source: https://github.com/motlin/claude-code-plugins/tree/main/plugins/build/skills/precommit
Command: npx skills add https://github.com/motlin/claude-code-plugins --skill precommit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires just, git.

What problem does it solve?

Manually running precommit checks and navigating the test-fix-rebase loop for multiple commits is repetitive, time-consuming, and prone to human error, often leading to broken builds. This Skill automates the entire validation process.

Core Features & Use Cases

  • Automated Precommit Checks: Guides on running just precommit to validate code changes before committing, including linters, formatters, type checkers, and unit tests.
  • Test-Fix Loop Automation: Automates the iterative process of testing all commits in a branch, fixing failures, creating fixup commits, and rebasing until all commits pass.
  • Error Extraction & Reporting: Intelligently filters build output to extract relevant errors, providing focused feedback for fixes.
  • Use Case: Automatically validate all your code changes before committing, ensuring that every commit on your branch passes tests and adheres to quality standards without manual intervention, saving you hours of debugging.

Quick Start

Run the precommit checks on my current changes and report any failures.

Frequently Asked Questions about precommit

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

FAQPage Schema
How do I run precommit checks before committing code?

Precommit checks validate code changes against linters, formatters, type checkers, and tests before commits are made. Run `just precommit` to execute configured hooks on your current changes and report any failures that block the commit.

Can I automate testing all commits in a branch at once?

Yes. This Skill automates the test-fix loop by validating all commits in your branch, extracting errors, creating fixup commits, and rebasing automatically until every commit passes quality checks without manual intervention.

What types of checks can precommit hooks enforce?

Precommit hooks support linters, formatters, type checkers, and unit tests across multiple languages. They validate code quality, syntax, style, and correctness before commits reach version control, ensuring consistent standards across your repository.

Does this work with existing Git workflows and CI/CD pipelines?

Yes. Precommit checks integrate with local development, CI pipelines, and PR validation. They work alongside Git version control and build automation tools, providing actionable feedback at every stage of your development workflow.

What happens if precommit checks fail?

When checks fail, the Skill extracts relevant errors from build output and reports them as focused feedback. Failures block the commit, prompting fixes before you can proceed, preventing broken code from entering version control.

What do I need to set up precommit checks?

You need repository access, Git installed, the `just` task runner, knowledge of your configured hooks, and compatible tooling for linters and tests. The Skill integrates with existing configurations to generate pass/fail results.