Skip to content

andreswebs/shell

v0.1.1MIT

Skills for the command line: defensive Bash scripting, jq for JSON, shelltestrunner tests, and calculations with bc

bash

Conventions and defensive patterns for writing, reviewing, and modifying Bash scripts, shell libraries, and BATS tests. Defines a short floor every script owes, then a triage gate that names which further features the script has actually earned: error handling, quoting, portability, path and JSON safety, logging, signal handling, CLI structure, and testing. Use when authoring or changing a shell script, shell function, or BATS test file, even if the user doesn't explicitly mention "conventions" or "style guide".

Compatibility
Requires shellcheck and shfmt, plus bats-core for tests. Patterns assume GNU coreutils, with documented preflight probes for BSD and macOS.
Read SKILL.md at the source

Pinned to revision 4f42cd2bb742, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.