Agent skill · Documentation

bash-defensive-patterns

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.

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill bash-defensive-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 2 KB
Bundled scripts: none
Path: skills/bash-defensive-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Bash Defensive Patterns 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. ## Use this skill when - Writing production automation scripts - Building CI/CD pipeline scripts - Creating system administration utilities - Developing error-resilient deployment automation - Writing scripts that must handle edge cases safely - Building maintainable shell script libraries - Implementing comprehensive logging and monitoring - Creating scripts that must work across different platforms ## Do not use this skill when - You need a single ad-hoc shell command, not a script - The target environment requires strict POSIX sh only - The task is unrelated to shell scripting or automation ## Instructions 1. Confirm the target shell, OS, and execution environment. 2. Enable strict mode and safe defaults from the start. 3. Validate inputs, quote variables, and handle files safely. 4. Add logging, error traps, and basic tests. ## Safety - Avoid destructive commands without confirmation or dry-run flags. - Do not run scripts as root unless strictly required. Re

What's inside
Steps it walks through
  1. Use this skill when
  2. Do not use this skill when
  3. Instructions
  4. Safety
  5. Resources
  6. Limitations
Ships with 1 file
  • resources/implementation-playbook.md
More from agentic-awesome-skills
All skills →
About this skill
What does the bash-defensive-patterns skill do?

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.

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill bash-defensive-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going