AI Disruption

AI Disruption

Claude Code Pre-Commit Checks: Only verify Counts

Claude Code 2.1.286 runs a skill named verify before code commits. Failed checks stop the commit. Docs only and tests only commits skip it.

Meng Li's avatar
Meng Li
Oct 02, 2026
∙ Paid

Letting Claude Code commit after it finishes changing the code is convenient, but the worry is that it commits without running checks. The usual workaround is a line in CLAUDE.md saying “run lint and tests before committing.” Whether it actually does that depends on whether it remembers.

Version 2.1.286, released on September 30, adds another path. From the changelog:

Improved commit guidance: when your project or user skills include one named `verify`, Claude is now told to run it right before committing, except for docs-only and tests-only commits

Meaning: if the project or user skills include one named verify, Claude is told to run it before committing, except for docs-only and tests-only commits. The original text is in the anthropics/claude-code repo on GitHub, in CHANGELOG.md, under the 2.1.286 section.

A skill is an instruction file in the project that tells Claude how to handle a certain kind of task. I set up a small project and tried it. Conclusion first:

If the skill is named verify, it is invoked on its own before a code-changing commit. If the checks fail, it does not commit and pastes the errors as-is. Docs-only and tests-only commits skip it.
The same skill under a different name is not invoked on its own. On tasks that hit lint, more than once it committed without running the checks at all.

User's avatar

Continue reading this post for free, courtesy of Meng Li.

Or purchase a paid subscription.
© 2026 Meng Li · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture