shell-scripting
bash 和其他 shell 的 Shell 脚本最佳实践。在编写 shell 脚本、bash 函数或命令行自动化时使用。
📖 中文导读:bash 和其他 shell 的 Shell 脚本最佳实践。在编写 shell 脚本、bash 函数或命令行自动化时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: shell-scripting description: Shell scripting best practices for bash and other shells. Use when writing shell scripts, bash functions, or command-line automation.
Shell Scripting Skill
When to Use
- Writing bash scripts
- Creating shell functions
- Automating command-line tasks
- Setting up environment configurations
- Writing CI/CD scripts
Guidelines
Comprehensive shell scripting best practices: @general.md
Key Principles
- Use shellcheck for validation
- Handle errors with set -e and set -u
- Quote variables properly
- Use meaningful variable names
- Document complex logic
- Test scripts thoroughly