Install Bash Defensive Patterns
Pick your agent. Every command is ready to paste.
npx skills add rmyndharis/antigravity-skills --skill bash-defensive-patternsThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads bash-defensive-patterns when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the bash-defensive-patterns skill”. In Codex, type $bash-defensive-patterns.
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
- Confirm the target shell, OS, and execution environment.
- Enable strict mode and safe defaults from the start.
- Validate inputs, quote variables, and handle files safely.
- 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.
Refer to resources/implementation-playbook.md for detailed patterns, checklists, and templates.
Resources
resources/implementation-playbook.mdfor detailed patterns, checklists, and templates.
Tips for Bash Defensive Patterns
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Bash Defensive Patterns
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 Bash Defensive Patterns?
Run "npx skills add rmyndharis/antigravity-skills --skill bash-defensive-patterns" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Bash Defensive Patterns work in Cursor and Codex?
Yes. Bash Defensive Patterns uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Bash Defensive Patterns free?
Bash Defensive Patterns is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Bash Defensive Patterns?
Bash Defensive Patterns is published by rmyndharis in the rmyndharis/antigravity-skills repository, together with 29 other skills.




