pre-commit-check

Run make check and make lint, then auto-fix with make format.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/daodaoedu/daodao --skill pre-commit-check-daodaoedu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-check
Source: https://github.com/daodaoedu/daodao/tree/main/.claude/skills/pre-commit-check
Command: npx skills add https://github.com/daodaoedu/daodao --skill pre-commit-check-daodaoedu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many commits contain formatting and linting errors that break CI or reduce code quality; this Skill runs local checks and attempts automatic fixes before a commit so broken or low-quality changes are caught early.

Core Features & Use Cases

  • Pre-commit quality gate: Run a sequence of checks to validate code formatting and static analysis results before committing.
  • Automatic fixes: Attempt to automatically fix fixable issues by running formatter targets and re-checking results.
  • Clear reporting: Surface remaining, non-fixable errors with guidance for manual fixes so developers can resolve problems before pushing changes.
  • Use Case: A developer preparing a PR runs the workflow to auto-format code, resolve trivial lint issues, and receive a concise list of outstanding problems to address.

Quick Start

Run make check, apply automatic fixes with make format if issues appear, re-run checks and report any remaining errors for manual resolution.

Frequently Asked Questions about pre-commit-check

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

FAQPage Schema
How do I run pre-commit checks to automate formatting and linting?

Pre-commit checks validate code formatting and static analysis before committing. The workflow runs `make check` and `make lint` to catch errors, attempts auto-fixes with `make format`, and reports remaining issues requiring manual resolution.

What is the best way to fix linting and formatting errors before a git commit?

To fix linting and formatting errors before a commit, run `make format` to attempt automatic fixes. The workflow then re-runs checks and surfaces a concise list of non-fixable issues that require manual resolution.

Can I use make targets to enforce static analysis and code quality locally?

Yes, you can use make targets to enforce code quality locally. The workflow executes `make check` and `make lint` to run static analysis and style rules, ensuring local developer workflows catch quality issues early before committing.

Why does my pre-commit workflow report remaining issues after running make format?

Remaining issues after `make format` occur because the formatter can only auto-fix trivial lint and style problems. The workflow reports these outstanding static analysis errors because they require manual code changes to fully resolve.

Does pre-commit static analysis work with local developer workflows without CI?

Yes, pre-commit static analysis works directly within local developer workflows without CI. It applies repository pre-commit checks using make-based targets to enforce style and lint rules, catching broken or low-quality changes early before pushing.