defensive-bash

Installation
SKILL.md

Defensive Bash Scripting for Server Automation

This skill provides expertise in writing safe, reliable, and maintainable Bash scripts for server administration, Docker automation, and Moodle operations.

Core Principles

1. Script Safety Headers

ALWAYS start scripts with:

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

Explanation:

  • set -e: Exit on any error
  • set -u: Exit on undefined variable
  • set -o pipefail: Fail if any command in a pipeline fails
  • IFS: Prevent word splitting issues
Related skills
Installs
1
First Seen
Feb 5, 2026