Back to skills
SKILL.md
1 Always Use Set E
ASecuritySub-skill of bash-cli-framework: 1. Always Use `set -e` (+4).
- 17 stars
- 0 votes
- 0 copies
- 4 views
- Added September 9, 2026
Works with
Security analysis
100/100npx -y skills add vamseeachanta/workspace-hub --skill 1-always-use-set-e --agent claude-codeAre you the author of 1 Always Use Set E?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-1-always-use-set-e)---
name: bash-cli-framework-1-always-use-set-e
description: 'Sub-skill of bash-cli-framework: 1. Always Use `set -e` (+4).'
version: 1.0.0
category: _core
type: reference
scripts_exempt: true
---
# 1. Always Use `set -e` (+4)
## 1. Always Use `set -e`
Exit immediately if a command exits with non-zero status:
```bash
set -e
# Or for more control:
set -euo pipefail
```
## 2. Quote Variables
Always quote variables to prevent word splitting:
```bash
# Good
echo "$variable"
"$command" "$arg1" "$arg2"
# Bad
echo $variable
$command $arg1 $arg2
```
## 3. Use Meaningful Exit Codes
```bash
# Exit codes
EXIT_SUCCESS=0
EXIT_ERROR=1
EXIT_USAGE=2
EXIT_CONFIG=3
```
## 4. Provide Feedback
Always tell the user what's happening:
```bash
log_info "Starting process..."
# do work
log_info "Process complete (processed $count items)"
```
## 5. Support Dry Run
Let users preview changes:
```bash
if [[ $DRY_RUN == true ]]; then
log_info "[DRY RUN] Would execute: $command"
else
eval "$command"
fi
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.