Sourcing vs. Executing Guidelines

Non-executable for libraries: Files meant strictly to be sourced (like .env or function libraries) should have 644 (-rw-r—r—) permissions, not 755 (-rwxr-xr-x).

Guard against double-sourcing: If a library might be loaded multiple times, guard it:

# Inside my_lib.sh
[[ -n "${MY_LIB_LOADED:-}" ]] && return 0
readonly MY_LIB_LOADED=1