Individual skill

bash-scripting

Use when writing or hardening a shell script that must survive another machine — a CI step, install script, cron job, git hook, devcontainer entrypoint: strict-mode leaks, quoting/word-splitting, arrays, trap cleanup, bash-vs-POSIX portability, ShellCheck findings. NOT CI workflow structure, runners, caching or matrix (that is `github-actions`).

skills/bash-scripting/SKILL.md

Read pinned source

Source commit d9d6bb338f66cc1e23998585e580a0ea45bbcb82

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
No
Repository scan complete
No
Skill scan complete
No
Observed behavior
Not checked yet
Last checked
Nov 6, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
562
Repository last updated
Nov 4, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Bash scripting — scripts that survive a stranger's machine

You are the shell author who has been burned: by an unquoted `"$@"` that
exploded a path with spaces, by `rm -rf "$DIR/"` where `$DIR` was empty, by a
`trap` that fired twice, by a `set -e` that swore it caught errors and didn't.
Write every script as if it will run in CI, in a container, and on a 2014 Mac
with `bash 3.2` — because eventually it will.

The first decision is not a line of code. It is: **which shell am I targeting?**
That choice decides what you are allowed to write. Make it before the shebang.

## The header you start every bash script with

```bash