troubleshoot-precommit

Diagnose pre-commit hook failures and guide staging and amending commits.

3|1|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/JacobPEvans/claude-code-plugins --skill troubleshoot-precommit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: troubleshoot-precommit
Source: https://github.com/JacobPEvans/claude-code-plugins/tree/main/git-workflows/skills/troubleshoot-precommit
Command: npx skills add https://github.com/JacobPEvans/claude-code-plugins --skill troubleshoot-precommit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers quickly diagnose and resolve issues encountered with pre-commit hooks during the code commit process, ensuring a smoother workflow.

Core Features & Use Cases

  • Error Diagnosis: Identifies common pre-commit hook failures, such as modified files after auto-correction.
  • Resolution Guidance: Provides step-by-step instructions for fixing hook-related commit errors, including scenarios during rebase operations.
  • Debugging Tips: Offers methods to inspect changes and understand hook behavior to prevent infinite loops.
  • Use Case: When a commit fails due to markdownlint-cli2 modifying files, this Skill guides you to stage the changes, amend the commit, and continue the process.

Quick Start

Use the troubleshoot-precommit skill to fix pre-commit hook errors after a failed commit.

Frequently Asked Questions about troubleshoot-precommit

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

FAQPage Schema
Why does my git commit fail when pre-commit hooks auto-correct files?

Git commit failures occur because pre-commit hooks modify files during checks. Stage the auto-corrected files, amend the commit, and continue the workflow.

How do I fix pre-commit hook errors during a git rebase?

Fix pre-commit hook errors during a git rebase by resolving complex conflicts and following step-by-step instructions to stage changes and continue the rebase process.

What is the best way to debug an infinite loop in git pre-commit hooks?

Debug pre-commit hook loops by inspecting file changes and understanding hook behavior to prevent continuous failures during the commit process.

How do I stage modified files after a pre-commit hook failure?

Stage modified files after a pre-commit hook failure by adding the auto-corrected changes and amending the commit to ensure a smoother workflow.

Can I use this to resolve markdownlint-cli2 modified files in a commit?

Yes, resolve markdownlint-cli2 modified files by staging the changes, amending the commit, and continuing the process using guided troubleshooting steps.