home / skills / masayan1126 / masayan-uni-code-plugins / bash-script-generator
This skill generates robust Bash scripts with error handling, argument parsing, and cleanup for reliable automation workflows.
npx playbooks add skill masayan1126/masayan-uni-code-plugins --skill bash-script-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: bash-script-generator
description: ユーザー要件に基づき、ベストプラクティスに従った堅牢なBashスクリプトを生成する
---
# Bashスクリプト生成スキル
ユーザーの要件をヒアリングし、エラーハンドリング・引数解析・クリーンアップ処理を備えた堅牢なBashスクリプトを生成します。
## 詳細ドキュメント
For workflow, see [WORKFLOW.md](WORKFLOW.md).
For bash template, see [TEMPLATE.md](TEMPLATE.md).
For user input form, see [FORMS.md](FORMS.md).
This skill generates robust Bash scripts based on user requirements, following established best practices. It produces scripts that include argument parsing, error handling, cleanup routines, and clear usage output to make maintenance and automation safer and easier.
I ask targeted questions about inputs, expected behavior, environment constraints, and failure modes, then synthesize a complete Bash script scaffold. The generated script includes getopt/shift-based argument parsing, set -euo pipefail options, trap handlers for cleanup, logging hooks, and inline comments to explain nontrivial logic. Outputs are tailored for portability and can be adjusted for specific shells or platforms on request.
Can you produce scripts compatible with sh and dash?
Yes—specify the target shell. I will avoid bash-specific features and use POSIX-compatible constructs when requested.
Do generated scripts include tests or linting?
I can include simple unit-style checks and a suggested shellcheck configuration or CI snippet on request.
How do you handle secrets or credentials?
I recommend reading secrets from secure stores or environment variables and will add redaction and minimal exposure patterns when you ask.