Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Forge Bash Scripting?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-forge-bash-scripting)
---
name: forge-bash-scripting
description: "Write robust Bash scripts: strict mode, quoting, traps, argument parsing and shellcheck-clean code"
---
<!-- Generated from catalog/skills/bash-scripting/SKILL.md by scripts/build-plugin.ts. Edit the catalog, not this file. -->
# Bash scripting
Use Bash for glue; switch to Python or Node when logic grows past ~100 lines.
## Safety
- `#!/usr/bin/env bash` and `set -euo pipefail`; `IFS` left default unless needed.
- Quote every expansion; use arrays for argument lists; `${var:?}` before destructive use.
- `mktemp` plus `trap 'rm -rf "$tmp"' EXIT` for temp files.
## Usability
- `usage()` with `-h`; parse flags with `getopts` or a `case` loop; validate required args.
- Log to stderr; exit codes mean something.
## Portability
- Avoid GNU-only flags if macOS users run it, or detect and branch.
## Verify
`shellcheck` passes with no warnings, and the script is run once with valid args and once with missing args (prints usage, exits non-zero).