safe-bash-scripting
CommunityPortable, safe Bash scripting standards.
Authoralexjcm
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Bash scripting standard provides portable, safe, and maintainable guidelines to ensure scripts run reliably across macOS (Bash 3.2) and Linux, with consistent structures and safety patterns.
Core Features & Use Cases
- Shebang and strict options: enforce #!/usr/bin/env bash and set -euo pipefail for robust behavior.
- Portability and compatibility: avoid Bash 4+ features, rely on portable constructs and referencing the provided best-practices.
- Defensive programming: quoting, input validation, safe file operations, and trap-based cleanup to improve reliability in automation tasks.
- Use cases include local automation, CI tooling, build scripts, and deployment helpers requiring predictable shell behavior.
Quick Start
Start new Bash scripts by applying the Safe Bash standards: begin with a POSIX-friendly shebang and set -euo pipefail, avoid Bash 4+ features, quote all variables, and reference the provided templates and references.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferencesassets
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: safe-bash-scripting Download link: https://github.com/alexjcm/agent-skillset/archive/main.zip#safe-bash-scripting Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.