---
title: "Bash Defensive Patterns - Air Market"
description: "Shell scripts tend to keep going after something has already gone wrong, and the damage shows up later. Defensive Bash is the set of habits that make a script stop, check, and clean up instead. Reach…"
canonical: "https://airmarket.ai/app/bash-defensive-patterns"
---

[Air Market](/) / [Developer Tools](/category/devtools) / Bash Defensive Patterns

Skill by [Seth Hobson](/@wshobson)

# Bash Defensive Patterns

Write shell scripts that fail loudly instead of silently

## What this does

Shell scripts tend to keep going after something has already gone wrong, and the damage shows up later. Defensive Bash is the set of habits that make a script stop, check, and clean up instead. Reach for it when a script is going to run unattended - in CI, or as a system utility.

### Top 3 things it does for you

- Write a shell script that holds up in production
- Add fault tolerance to a CI/CD pipeline script
- Harden a system utility against bad input

## Information

**Bash Defensive Patterns at a glance**

|  |  |
| --- | --- |
| Kind | Skill |
| Publisher | [Seth Hobson](/@wshobson) |
| Category | [Developer Tools](/category/devtools) |
| Works with | Agent Skills - an open standard supported by 40+ agents |
| Size | 11 KB |
| Licence | MIT |
| Repository | [wshobson/agents](https://github.com/wshobson/agents/tree/be57c0b2e3c05c528ca6132b87410b385718775f/plugins/shell-scripting/skills/bash-defensive-patterns) |
| GitHub stars | 39,077 (as of Nov 2026) |
| Installs | 14,212, counted by skills.sh (Nov 2026) |

## Security report

**Verified.** AIR scanned this exact version of Bash Defensive Patterns and flagged nothing. AIR's verdict: **safe**.

**What Bash Defensive Patterns's check was run against**

|  |  |
| --- | --- |
| Commit | be57c0b2e3c05c528ca6132b87410b385718775f |
| Content hash | c78ad264342c26f1523d79c6259b31e0ce411e430ca75cab0c77397c537457dd |
| Files read | [Browse the files at this exact commit](https://github.com/wshobson/agents/blob/be57c0b2e3c05c528ca6132b87410b385718775f/plugins/shell-scripting/skills/bash-defensive-patterns/SKILL.md) |

A scan is named by the exact content it read, not by a version number. A different version is a different artifact, and nothing here applies to a version AIR has not scanned.

[Read the full security report for Bash Defensive Patterns](/security/bash-defensive-patterns)

## About Bash Defensive Patterns

This covers defensive Bash programming techniques for production-grade scripts.

Use it when writing robust shell scripts, CI/CD pipelines, or system utilities that need fault tolerance and safety.

## What's inside

- SKILL.md - instructions
- references/details.md - reference

## Questions

### Is Bash Defensive Patterns safe to install?

AIR scanned this exact version of Bash Defensive Patterns and flagged nothing. AIR's verdict: safe. The verdict is named by the content that was read, at commit be57c0b2e3c0, so it cannot drift onto a version nobody scanned. The full report is at https://airmarket.ai/security/bash-defensive-patterns.

### How do I install Bash Defensive Patterns?

Open https://airmarket.ai/app/bash-defensive-patterns on Air Market and use the install action: Air Market hands Claude a prompt naming this exact skill, and Claude sets it up. Source, pinned to the exact commit this listing describes: https://github.com/wshobson/agents/tree/be57c0b2e3c05c528ca6132b87410b385718775f/plugins/shell-scripting/skills/bash-defensive-patterns. Install from that link, not the branch.

## Related on Air Market

- [More Developer Tools listings](/category/devtools)
- [Everything by Seth Hobson](/@wshobson)

---

Canonical URL: <https://airmarket.ai/app/bash-defensive-patterns>
