Skip to main content

shell-script-development

This skill should be used when the user asks to "create a bash script", "write a shell script", or mentions shell scripting conventions.

来源信息

仓库
dwmkerr/claude-toolkit
最近来源活动
2026年2月26日 08:04
检测到的 SKILL.md 语言
英语
星标
23
分支
2

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
shell-script-development
description
This skill should be used when the user asks to "create a bash script", "write a shell script", or mentions shell scripting conventions.
# Shell Script Development Create shell scripts following consistent conventions. ## Template ```bash #!/usr/bin/env bash set -e -o pipefail # Colors green='\033[0;32m' red='\033[0;31m' yellow='\033[1;33m' blue='\033[0;34m' nc='\033[0m' # Script logic here echo -e "${green}✔${nc} completed successfully" ``` ## Conventions | Element | Convention | |---------|------------| | Shebang | `#!/usr/bin/env bash` | | Safety | `set -e -o pipefail` | | Local variables | Lowercase (`model`, `dir`, `count`) | | Environment variables | Uppercase (`PATH`, `HOME`, `USER`) | | Color variables | Lowercase (`green`, `red`, `nc`) | | Status words | Lowercase (`error`, `warning`, `note`) | ## Status Output Patterns ```bash echo -e "${green}✔${nc} task completed" # success echo -e "${red}error${nc}: something failed" # error echo -e "${yellow}warning${nc}: something to note" # warning echo -e "${blue}info${nc}: informational message" # info ``` ## Important After creating or modifying shell scripts, inform the user: > **Make executable.** Run `chmod +x script.sh` before use.
在 GitHub 查看