Best for
- Writing production automation scripts
- Building CI/CD pipeline scripts
- Creating system administration utilities
wshobson/agents/plugins/shell-scripting/skills/bash-defensive-patterns/SKILL.md
Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.
Decision brief
Comprehensive guidance for writing production-ready Bash scripts using defensive programming techniques, error handling, and safety best practices to prevent common pitfalls and ensure reliability.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/wshobson/agents --skill "plugins/shell-scripting/skills/bash-defensive-patterns"Inspect the Agent Skill "bash-defensive-patterns" from https://github.com/wshobson/agents/blob/c4b82b0ad771190355eb8e204b1329732a18449a/plugins/shell-scripting/skills/bash-defensive-patterns/SKILL.md at commit c4b82b0ad771190355eb8e204b1329732a18449a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Writing production automation scripts
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
1. Always use strict mode - set -Eeuo pipefail 2. Quote all variables - "$variable" prevents word splitting 3. Use [[]] conditionals - More robust than [ ] 4. Implement error trapping - Catch and handle errors gracefully 5. Validate all inputs - Check file existence, permissions…
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 79/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 38,313 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Comprehensive guidance for writing production-ready Bash scripts using defensive programming techniques, error handling, and safety best practices to prevent common pitfalls and ensure reliability.
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
set -Eeuo pipefail"$variable" prevents word splittingcommand -v - Safer than which for checking executables