All skills
lexler avatar

/writing-bash-scripts

@83aee6a
by Lada Kesselerlexler/skill-factory238 stars
61

Bash script style guide. Always use when writing bash scripts, shell scripts, or CLI bash tools.

Use this Skill: https://skilld.dev/gh/lexler/skill-factory/writing-bash-scripts

This session only. Nothing lands on disk.

SKILL.md

≈30 tokens always: the name and description. ≈104 when used: this file. ≈839 more on demand in 1 file.

Bash Script Style Guide

  • Use #!/usr/bin/env bash as shebang
  • Always use set -euo pipefail for safety
  • Keep scripts minimal: no unnecessary comments or echoes
  • Minimal input validation; print usage to stderr and exit if inputs are missing/invalid
  • Don't check for installed commands if failure is obvious on use
  • Make script executable: chmod +x <script>
  • Prefer concise, direct logic over verbosity

Source: SKILL.md on GitHub

1 warning6d4 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    This skill provides a set of stylistic and safety guidelines for writing Bash scripts. It encourages the use of safety flags and minimal coding practices. No security issues were detected.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: LOW · No issues

  • Runlayer7mo

    1/1 file flagged

Signed by skilld at 83aee6a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 8 months ago

README badge

README badge for lexler/skill-factory/writing-bash-scripts