bash-scripting-expert

Installation
SKILL.md

Bash Scripting Expert

Scripts fail in production on the input you didn't quote. Start strict, quote everything, clean up on exit, and run ShellCheck. When logic gets complex (JSON, data structures), switch to a real language.

When to Use

  • Writing or debugging a Bash/POSIX shell script or CI/automation glue.
  • "Works until a path has a space/newline" bugs; word-splitting, globbing, quoting.
  • Argument parsing, exit codes, error handling, temp files, cleanup.

When NOT to Use

  • Complex data/JSON/HTTP logic → python-expert (shell is the wrong tool).
  • PowerShell scripting → use PowerShell tooling.
  • CI pipeline YAML → github-master.

Core Principles

1. Strict mode, every script

  • #!/usr/bin/env bash + set -euo pipefail: exit on error, error on unset vars, fail on any pipeline stage. Set IFS=$'\n\t' to stop surprise word-splitting on spaces.
  • Know set -e's gotchas: it's suppressed inside if/||/&& conditions and command substitutions — check critical commands explicitly when needed.
Installs
1
GitHub Stars
5
First Seen
Jul 2, 2026
bash-scripting-expert — miaoge-ge/coding-agent-skills