What problem does it solve?
It prevents common shell scripting failures by providing practical, repeatable guidance for writing correct and robust bash scripts.
Core Features & Use Cases
- Safety-first script structure: enforce reliable error handling with
set -euo pipefail, safe globbing behavior, and cleanup via trap.
- Correctness through defensive coding: quote all expansions, validate inputs, check exit codes explicitly, and avoid unsafe patterns that cause subtle bugs.
- Portability and maintainability: choose the right shell target, avoid bash-isms when using POSIX sh, and apply consistent style for readability and long-term reuse.
- Use case: review or rewrite a script that sometimes breaks on edge cases (spaces in filenames, unset variables, failing commands in pipelines) so it behaves predictably across environments.
Quick Start
Use this skill when you want the AI to rewrite a bash script to be safer and more robust, for example by fixing quoting, argument parsing, and error handling for a script you paste in.