Skip to content
Back to skills

Forge Bash Scripting

BSecurity

Write robust Bash scripts: strict mode, quoting, traps, argument parsing and shellcheck-clean code

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentspythonshellbashnode

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro shows the line behind each finding and how to fix it

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill forge-bash-scripting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Forge Bash Scripting?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Forge Bash Scripting
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-forge-bash-scripting/badge)](https://www.skillsdirectory.com/skills/ansh44233-forge-bash-scripting)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.