husky-pre-commit-bypass

Diagnoses Husky pre-commit hooks that sweep unrelated files into commits and restores clean staging.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill husky-pre-commit-bypass-vilnacrm-org
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: husky-pre-commit-bypass
Source: https://github.com/VilnaCRM-Org/claude-plugins/tree/main/plugins/react-frontend-sdlc/skills/husky-pre-commit-bypass
Command: npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill husky-pre-commit-bypass-vilnacrm-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Husky pre-commit hooks that run a repository-wide formatter followed by git add -A can drag files your change never touched into a commit, or reject the commit over lint and test failures in unrelated code. This Skill provides a compliant procedure to make the tree formatted and green before staging, so the hook becomes a no-op without ever skipping it. ## Core Features & Use Cases - Formatter Drift Triage: Run the format target before staging, inspect git status --porcelain, and split pre-existing drift into its own style commit or restore files owned by other branches. - Hook Reproduction: Re-run the lint and unit-test targets locally so nothing fails at commit or push time, skipping any profile key mapped to null with a recorded note. - Shape-Aware Guidance: Covers React SPA, Next.js, and component-library repository shapes, including where the heavy gate lives (pre-commit vs pre-push) per shape. - Use Case: Your focused feature commit balloons into a 40-file diff because the hook reformatted the repo. Use this Skill to separate the formatting sweep, stage only intended files, verify with git diff origin/main --name-only, and push explicitly to the feature branch. ## Quick Start Ask the assistant to fix a Husky pre-commit hook that pulled unrelated reformatted files into your commit and split the formatting drift into a separate commit.

Frequently Asked Questions about husky-pre-commit-bypass

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

FAQPage Schema
How do I stop a Husky pre-commit hook from committing unrelated files?▼

Run the repository formatter as its own step before staging, then inspect git status --porcelain. Land pre-existing formatting drift as a separate style commit or restore files owned by other branches, then stage only your intended files so the hook finds a clean tree.

How to fix a pre-commit hook failing on lint or tests in unrelated code?▼

Reproduce the hook locally by running the lint and unit-test targets before committing, so failures surface early. If the failure is in code your branch does not own, restore those files and let the owning branch fix them rather than skipping the hook.

Can I skip Husky hooks with --no-verify when a commit fails?▼

No, skipping the hook is out of policy in these repositories, and the checks it runs are the same ones CI enforces. The compliant approach is to make the tree formatted and green before staging so the hook becomes a no-op.

Why does my commit pass but git push get rejected by Husky?▼

In the Next.js repository shape, the heavy format, lint, and unit-test gate lives in .husky/pre-push rather than pre-commit. A clean commit can still fail at push time, so run those targets locally before pushing.

When should formatting drift be its own commit instead of part of my feature?▼

When the formatter touches files your change never touched, land that drift as a separate style commit first so the feature commit stays readable and reviewable. Only a deliberate repository-wide formatting pass should mix the sweep into one change.