npx claudepluginhub jacobpevans/claude-code-plugins --plugin git-workflowsThis skill uses the workspace's default tool permissions.
Diagnose and fix pre-commit hook issues that occur when committing code.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Diagnose and fix pre-commit hook issues that occur when committing code.
This error looks like:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
markdownlint-cli2........................................................Failed
- hook id: markdownlint-cli2
- files were modified by this hook
What happened: Pre-commit hooks auto-corrected formatting issues. The fixes weren't committed automatically.
Pre-commit hooks run BEFORE your commit. If they auto-fix files, your staged changes no longer match your working directory. Git stops to let you review the changes.
Stage the auto-fixed files and amend the commit:
git add -A
git commit --amend --no-edit
git push origin <branch>
If this happens during a rebase operation:
# In the worktree where the rebase is running:
git add -A # stage the hook changes
git commit --amend --no-edit # update the current commit in the rebase
git rebase --continue # continue the rebase
# After the rebase finishes:
git push origin <branch> # push the rebased branch
If hooks keep modifying files in a loop:
git diff # See what changed
git diff HEAD~1 # See what the hook is trying to fix
| Hook | Fixes |
|---|---|
trim-trailing-whitespace | Removes spaces at end of lines |
end-of-file-fixer | Ensures files end with newline |
markdownlint-cli2 | Fixes markdown formatting |
prettier | Reformats code/JSON/YAML |
eslint with --fix | Fixes JavaScript/TypeScript issues |
git commit --no-verify to skip hooks