Uses jscpd to detect code clones in shell scripts.
Blocks commit if duplication exceeds 5% threshold.
Suggests extracting common code to scripts/lib/common.sh.
- Auto-fix with shfmt on staged files
- Run shellcheck validation directly instead of full shell_check.sh
- Avoids shfmt -d validation after auto-formatting (prevents .orig file loop)
- Ensures consistent formatting without blocking commits