원클릭으로
bash-expert
Write reliable shell commands and scripts
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write reliable shell commands and scripts
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | bash-expert |
| description | Write reliable shell commands and scripts |
Follow these steps when writing or executing shell commands:
Always use set -e at the top of multi-line scripts so the script exits on the first error rather than silently continuing.
Quote all variables with double quotes: "$var" not $var. Unquoted variables break on spaces and special characters.
Capture stderr alongside stdout when you need full output: use command 2>&1 or check both streams separately.
Check exit codes explicitly for commands where failure matters but doesn't abort the script:
if ! command; then
echo "command failed" >&2
exit 1
fi
Use mktemp for temporary files rather than hard-coded paths like /tmp/foo. This avoids collisions between concurrent runs.
Prefer find . -name '*.ts' -print0 | xargs -0 over for f in $(find ...) when filenames may contain spaces.
Use || true to suppress errors for optional commands (e.g. rm -f file || true).
Limit output when running commands that may produce large output: pipe through head -n 100 or slice with tail -n 50.
Explain what a command does in a comment above it when it is non-obvious — especially for pipes and compound expressions.
Test destructive commands (rm, overwrite) with echo or --dry-run first if supported by the tool.