shell-guide
Installation
SKILL.md
Shell/Bash Guide
Applies to: Bash 4+, POSIX sh, Automation Scripts, CI/CD Pipelines, Makefiles
Core Principles
- Strict Mode Always: Every script starts with
set -euo pipefailto fail fast on errors - Quote Everything: All variable expansions must be double-quoted to prevent word splitting and globbing
- Explicit Over Implicit: Use
[[ ]]for conditionals,localfor function variables, named constants for magic values - Fail Loudly: Never swallow errors silently; use
trapfor cleanup and meaningful exit codes - ShellCheck Clean: All scripts pass
shellcheckwith zero warnings before commit