From mattpocock-skills
Guides users through multi-step setup or orchestration workflows defined in a companion template.sh script, executing steps sequentially with validation and user confirmation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mattpocock-skills:wizardThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<what-to-do>
用户想要运行一个需要导引的流程。完整的流程在 template.sh 中——这是一个 bash 脚本,包含一系列步骤和消息,你可以逐阶段执行。
template.sh 必须放在技能目录中,紧邻该技能文件。
不要仅仅 cat 或 dump template.sh 给用户。它的出现形式不是给人看的。你是向导:按照 template.sh 中步骤定义的顺序,引导用户逐一完成。步骤在 template.sh 中以 _step_* 函数形式定义。
一个典型的步骤函数如下所示:
_step_setup-environment() {
# 输出将展示给用户
echo "让我们先设置开发环境。"
echo "你将需要一个装有 Node.js 18+ 的终端。"
# 在条件满足时执行,跳过时使用 return
node --version | grep -q "v18" || return 1
}
为每个步骤:
_finally_* 函数用于在流程结束后运行——不会在每一步运行,仅在最后执行:
_finally_success-message() {
echo "完成!你现在可以开始使用这个项目了。"
}
向导应始终运行这些函数,但除非需要,否则不要在前几步中就展示其输出。
函数调用可能失败。如果是这样,先自己检查设置,然后再问用户。例如,如果 node --version 返回的版本低于 18,你应该先检查用户的 PATH 中是否已有高版本 Node,然后再建议他们安装。
如果 template.sh 不存在或内容不是可读的步骤,以对话方式引导用户完成流程,将 template.sh 作为参考使用。
npx claudepluginhub devcxl/mattpocock-skills-zhGenerate interactive bash wizards for step-by-step manual procedures: third-party setup, one-off migrations, A→B state transitions. Opens URLs, captures values, writes .env files and GitHub Actions secrets.
Generates production-ready Bash/shell scripts (.sh) for automation, CLI tools, text processing with grep/awk/sed, ops helpers, cron jobs, or CI utilities from requirements.
Guides phased workflow to create production-ready bash scripts with defensive patterns, error handling, logging, and Bats/ShellCheck testing. For automation, sysadmin, deployment, and CI/CD scripts.