AGENT SKILL

writing-bash-scripts

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

License 许可
Unlicense
所属仓库
saski/arnesto
最近更新
2026-11-12
Stars
★ 6
Forks
0

01 前言 Front Matter

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

03 SKILL.md 正文

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

04 同仓库更多 Skills