← ClaudeAtlas

sota-shell-scriptinglisted

State-of-the-art shell scripting (bash-focused, defensive) for writing and auditing shell scripts, CI scripts, init/deploy scripts, container entrypoints, and Makefile recipes. Use when the task involves creating, modifying, reviewing, or hardening any shell code — trigger keywords: bash, shell script, sh, zsh, shellcheck, shfmt, CI script, Makefile shell, entrypoint script, set -euo pipefail, dotfiles, install script, cron job, wrapper script.
martinholovsky/SOTA-skills · ★ 8 · AI & Automation · score 75
Install: claude install-skill martinholovsky/SOTA-skills
# SOTA Shell Scripting Purpose: produce shell scripts that survive contact with reality — unusual filenames, missing commands, partial failures, hostile input, signals, and concurrent invocation — and audit existing scripts for the defect classes that cause most production shell incidents: unquoted expansions, silent error swallowing, injection, secret leakage, and temp-file races. Bash-focused (bash 5.x current; macOS ships bash 3.2 and defaults to zsh — see portability rules). POSIX `sh` only when the target demands it (busybox/dash containers, init systems). ## First decision: should this be shell at all? **Do NOT use shell when any of these hold.** Recommend Python/Go (or the project's primary language) instead, and say so explicitly in BUILD and AUDIT output: - Script exceeds ~100 lines of actual logic (not counting boilerplate/usage text). - Needs real data structures (nested maps, JSON manipulation beyond a `jq` one-liner, sets). - Needs granular error handling (retry *this* step, distinguish error kinds, partial rollback). - Does arithmetic beyond integers, date math, or float comparison. - Parses structured formats (JSON/YAML/XML) with string surgery instead of `jq`/`yq`. - Needs portable concurrency beyond "run N jobs and `wait`". - Is security-critical input handling (auth, parsing untrusted network data). Shell is the right tool for: gluing processes together, CI steps, container entrypoints, small install/deploy wrappers, environment setup — anything that i