Sub-skill of bash-cli-framework: 1. Always Use `set -e` (+4).
Scanned 9/9/2026
Install to Claude Code
npx -y skills add vamseeachanta/workspace-hub --skill 1-always-use-set-e --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of 1 Always Use Set E?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-1-always-use-set-e)More formats (shields.io, HTML) on the badges page.
---
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
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!