shell-scripts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShell Scripts Workflow
Shell脚本工作流
Workflow for shell script changes.
Shell脚本变更的工作流。
Prerequisites
前提条件
- Use Skill for branch, commit, and PR workflow.
git-workflow - Refer to for detailed best practices (SSOT).
.claude/rules/shell-script.md
- 使用Skill 处理分支、提交和PR工作流。
git-workflow - 参考获取详细最佳实践(SSOT)。
.claude/rules/shell-script.md
Applicable Files
适用文件
| Path | Description |
|---|---|
| All shell scripts |
| Shell scripts anywhere |
| 路径 | 描述 |
|---|---|
| 所有Shell脚本 |
| 任意位置的Shell脚本 |
Workflow
工作流
1. Make Changes
1. 进行修改
Edit shell scripts following the rules in .
.claude/rules/shell-script.md按照中的规则编辑Shell脚本。
.claude/rules/shell-script.md2. Verify (from rules/shell-script.md)
2. 验证(来自rules/shell-script.md)
bash
make shfmt
shellcheck scripts/{script}.sh # if installedbash
make shfmt
shellcheck scripts/{script}.sh # if installed3. Self-Review Checklist
3. 自我检查清单
- Script is executable ()
chmod +x - Has shebang line ()
#!/usr/bin/env bash - Uses strict mode ()
set -euo pipefail - Variables are quoted
- All comments and messages are in English
- 脚本具备可执行权限()
chmod +x - 包含shebang行()
#!/usr/bin/env bash - 使用严格模式()
set -euo pipefail - 变量已加引号
- 所有注释和消息均为英文
Related
相关链接
- - Shell rules (SSOT)
.claude/rules/shell-script.md - - Branch, commit, PR workflow
git-workflow
- - Shell规则(SSOT)
.claude/rules/shell-script.md - - 分支、提交、PR工作流
git-workflow