Agent skill
bash-cli-framework-1-always-use-set-e
Sub-skill of bash-cli-framework: 1. Always Use `set -e` (+4).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_core/bash/bash-cli-framework/1-always-use-set-e
SKILL.md
1. Always Use set -e (+4)
1. Always Use set -e
Exit immediately if a command exits with non-zero status:
set -e
# Or for more control:
set -euo pipefail
2. Quote Variables
Always quote variables to prevent word splitting:
# Good
echo "$variable"
"$command" "$arg1" "$arg2"
# Bad
echo $variable
$command $arg1 $arg2
3. Use Meaningful Exit Codes
# Exit codes
EXIT_SUCCESS=0
EXIT_ERROR=1
EXIT_USAGE=2
EXIT_CONFIG=3
4. Provide Feedback
Always tell the user what's happening:
log_info "Starting process..."
# do work
log_info "Process complete (processed $count items)"
5. Support Dry Run
Let users preview changes:
if [[ $DRY_RUN == true ]]; then
log_info "[DRY RUN] Would execute: $command"
else
eval "$command"
fi
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?