Hook discipline
Use when a pre-commit, pre-push, or CI hook fails. Fix the underlying issue rather than bypassing the hook. Never use --no-verify or equivalent without explicit user approval.From its SKILL.md
npx -y skills add jackjconner/agent-harness --skill hook-disciplineAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, as published. Nobody here has run it
Hook discipline
Hooks exist because past-you (or past-team) needed them. A failing hook is a signal, not an obstacle.
The rule
When a hook fails:
- Read the failure output.
- Fix the underlying issue.
- Re-stage, re-commit. Hooks may auto-fix on first run (formatters, trailing whitespace) — re-add and retry.
Never use any of:
git commit --no-verify/-ngit commit --no-gpg-signgit -c commit.gpgsign=false commitgit push --no-verify- Removing or commenting out hook entries to "make it work"
Why
Suppression is the path of least resistance under time pressure. Removing the path forces real fixes. Every bypass leaves a landmine for the next agent or human who runs the suite cleanly.
If the hook is genuinely wrong for this codebase, raise it with the user as a config change. Don't bypass.
After a hook failure: NEW commit, not amend
If a pre-commit hook fails, the commit did not happen. Running
git commit --amend after a hook failure modifies the previous
commit, which can destroy unrelated work. Instead:
- Fix the issue.
- Re-stage the files (
git add <paths>). - Run
git commitfresh.
When the user explicitly authorizes a bypass
Some workflows have legitimate one-off bypasses (rebase recovery, a known-broken hook the user is patching). The user must say so explicitly for that commit. Authorization doesn't carry forward.
Exit condition
The hook passes cleanly on a fresh run, OR the user has explicitly approved a one-time bypass for this commit.