bash-safety
Installation
SKILL.md
Bash Safety & Best Practices
When writing or reviewing bash scripts, apply the rules below. For the complete catalog of rules with detailed examples, see reference.md.
Sources: BashPitfalls, Shellharden.
Rule 0: Run ShellCheck
Before any manual review, run static analysis:
shellcheck -o all script.sh
-o all enables every optional check (including those not on by default).
Fix all errors and warnings before proceeding. ShellCheck catches the
majority of the pitfalls listed here automatically.