hermeticormus/shell-safety-skills · Archived

shell-safety

Shell-safety discipline for bash/sh scripts — set -euo pipefail boilerplate, proper quoting, array handling, error patterns. Use when writing, modifying, or reviewing any shell script, Makefile, or .bashrc/.zshrc.

First seen Jun 20, 2026

Installation

$ npx skills add hermeticormus/shell-safety-skills --skill shell-safety

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,093 B
  • docs SUMMARY.md 235 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Shell safety

Apply to every shell script written or modified.

Boilerplate every script needs

#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'

Always

  • Quote variable expansions: "$var", "$@"
  • [[ ... ]] over [ ... ]
  • (( ... )) for numeric
  • Arrays for argument lists, expand "${args[@]}"
  • done < <(cmd) not cmd | while read
  • rm -rf "${var:?}/..." for destructive ops

Never

  • Missing shebang
  • Missing set -euo pipefail
  • Unquoted variable expansion
  • cd without check
  • rm -rf "$var/" without ${var:?}
  • eval (almost always wrong)
  • for line in $(cat file) — use while IFS= read -r line < file
  • echo on untrusted data — use printf '%s\n'

Full content + 15 worked failure-mode examples at https://github.com/HermeticOrmus/shell-safety-skills.