Bash Defensive Patterns
Implements robust, production-grade Bash scripts using defensive programming techniques, error handling, and security best practices.
This skill equips Claude with specialized knowledge to write highly reliable and fault-tolerant shell scripts suitable for production environments and CI/CD pipelines. It focuses on critical defensive patterns such as Bash strict mode, secure variable handling, idempotent designs, and comprehensive error trapping to prevent common pitfalls like silent failures or accidental data loss. Whether building system utilities or complex deployment automation, this skill ensures your shell scripts are maintainable, portable, and resilient across different platforms.
主要功能
01Enables robust error trapping and cleanup routines for system safety.
02Implements Bash Strict Mode (set -Eeuo pipefail) for early error detection.
0381 GitHub stars
04Ensures script idempotency and safe file operations for reliable automation.
05Provides safe variable and array handling patterns to prevent word splitting.
06Offers templates for argument parsing, structured logging, and dry-run support.
使用场景
01Creating robust system administration utilities and maintenance scripts.
02Building portable shell script libraries that handle edge cases gracefully.
03Developing mission-critical CI/CD pipeline scripts and deployment automation.