/wizard 技能
生成一个引导人类逐步完成配置的脚本。
Install this skill
npx skills@latest add mattpocock/skills --skill=wizardThen type /wizard in your coding agent.
- Source
- mattpocock/skills
本页内容
它的作用
wizard generates an interactive bash script that walks a human, step by step, through a manual procedure: wiring up third-party services, running a one-off migration, moving a project from state A to state B. It opens each URL, says what to click and copy, captures what comes back, and writes it into .env 文件和 GitHub Actions 密钥。
这个 agent writes the script; it never runs it. You do, on your own machine. A wizard is a program, not a list of instructions. The script runs each step in order and keeps the values you enter. Your part is to click, paste, and press Enter.
何时使用
你可以输入 /wizard, and the agent can also reach for it on its own. When it hits a step you have to take (a key it can't mint, a dashboard it can't click), it builds you a wizard instead of writing the instructions into the chat, where they scroll away.
当阻塞你的下一件事是穿越一个仪表盘时使用它:
| 情境 | wizard 做什么 |
|---|---|
| 一个新开发者在应用启动前需要配置六个服务 | 按顺序打开每个仪表盘,捕获密钥,把它们写入 .env 和 CI |
| 一次性迁移需要按特定顺序拨动开关 | 把不可逆的步骤排在确认门之后 |
| 一个项目需要从状态 A 一次性移动到状态 B | 走完转换,报告做不到的部分 |
| 你正要把这些步骤写进 README | Writes an executable version instead, which fails visibly when a step goes stale |
不要用它来 decide 构建什么;为此, grill-with-docs and to-spec 就是工具。
前置条件
生成它无需任何前置。它写的 wizard 在 bash 上运行,并使用 gh 当某个阶段设置 GitHub 密钥或变量时。如果 gh is missing or not authenticated, the run does not fail. That stage shows a warning, and the closing summary tells you what to set by hand.
阶段
A stage 是一个屏幕上一个专注的任务。脚本会在阶段之间清空终端,所以溢出屏幕的阶段会丢失滚走的部分。你按依赖顺序编写阶段,并设置 TOTAL_STAGES,它驱动进度显示。
这个 skill scopes the procedure before it writes any script. It reads the repo instead of asking cold: .env*, docker-compose*,框架配置,以及每个 secrets.* / vars.* 在 .github/workflows/. Each of those references is a value the wizard has to produce. It then shows you the ordered stage list to confirm. Only after you confirm does it map each stage to the exact path a human follows ("Dashboard → Developers → API keys → Reveal test key → copy"). Where it doesn't know the current UI, it asks you or checks the docs rather than inventing clicks.
For each captured value, scoping decides where it goes:
| 目的地 | 何时 |
|---|---|
.env only | 本地开发需要它,CI 不需要 |
| GitHub 密钥 | CI 会读取它,而且是敏感的 |
| GitHub 变量 | CI 会读取它,而且是公开的 |
两者 .env 和一个密钥 | 本地开发与 CI 都需要它 |
| 哪里都不 | The stage is a pure action: a switch flipped, a plan upgraded |
模板已经解决了用户体验
这个 template 自带完整体验:带剩余时间的进度、确认门、包括 WSL 的跨平台 URL 打开、密钥隐藏输入、幂等的 .env upsert, gh secret / gh variable 写入,以及一份关于它不得不跳过之物的收尾摘要。 STAGES marker is a fixed library, identical in every wizard and never hand-edited. Because the library never changes, every wizard behaves the same way. The only work per wizard is to scope the procedure and author its stages.
The agent that writes a wizard never runs it end to end, because the script opens browsers and waits for human input. The agent checks it statically instead: bash -n, shellcheck 在可用处,以及每个值都落在范围界定所说之处的追踪,连同每个 set_secret 名字匹配真实的 secrets.* reference in CI. So the first run is yours, and that run is the test.
默认即短暂
| 你手头有什么 | 怎么处理脚本 |
|---|---|
| 一次性迁移、个人配置、永远不会重复的过渡 | 把它保存到临时或 scripts/ 路径,运行它,删除它 |
| 仓库里的下一个人也会需要的配置路径 | 提交它并从 README 链接它,这样他们运行脚本,而不是重新问智能体 |
常见问题
我的 API 密钥会进入模型的上下文吗?
不。智能体写脚本;它不运行脚本。脚本由你自己运行,它以隐藏终端输入的方式捕获密钥,并直接写入 .env or gh secret. The wizard is a CLI, and the model is not connected to it. This holds only for values the wizard captures at runtime. If you paste a key into the chat while scoping the procedure, it's in the context 就像其他粘贴的文本一样。
我能回去修改打错的某个值吗?
Not mid-run. There is no back button. The stages run forward, and a wrong answer on stage 3 means Ctrl-C and re-run. Re-running is cheap, because any value already written to .env is offered back as a default, so you press Enter through the stages you got right and retype only the wrong one. Users asked for this in launch week, and it is still open: "loved it! One thing though, is there a way to go back and correct what you've entered?"
它知道我已完成什么配置吗?
Partly, and less than the launch reactions assumed. It reads the repo before it asks (your .env 文件, docker-compose,框架配置、 secrets.* references in CI), so it scopes to values that are missing rather than starting from zero the way a README does. What it doesn't do is check the third-party service. If a key exists in your .env wizard 会把它回显,按回车保留;如果你已创建 Stripe 账户但从没保存过密钥,wizard 仍会带你去仪表盘拿它。
Where does it sit in the workflow, after grilling and the spec?
没有特别的位置。它是独立的,不是链上的一步。常见的猜测是 /grill-with-docs → /to-spec → /wizard, and that sequence is fine, but the trigger is a manual procedure showing up, which can happen at any point: before you start, mid-build, or long after ship. It also works as a discovery tool. Scoping finds the hidden prerequisites of a task, like the three API keys you hadn't thought about, before you commit to the work.
它在 Claude Code 之外能工作吗?
The script does. It's plain bash, and it runs the same whatever 运行框架 generated it. The skill itself is model-invoked, so it's listed everywhere: type /wizard 在 Claude Code 或 $wizard 在 Codex 中,或直接描述你卡住的配置。由模型自动调用也让它远离 #693, where Claude's desktop and web apps drop user-invoked 来自 model的列表并把它们报告为未安装。
这个以前不是由用户调用的吗?
It did. It's now model-invoked, so the agent reaches for it unprompted when it hits a step you have to take. Nothing you could do before stopped working. Model invocation lets the agent call the skill as well as you, so /wizard behaves as it did. The change fixes one failure. Before, an agent that hit a credentials wall mid-build dumped six numbered steps into the chat for you to follow by hand. Now it writes a wizard.
它以前在 in-progress/. Where is it now?
engineering/,自 v1.2 起。它已从测试桶毕业,随插件一起发布,与其余正式版技能一同到来,无需单独安装。毕业时其行为没有改变。
做到以下就算成功
- You're shown an ordered list of stages, and the values each one produces, and asked to confirm, before any script exists.
- 每个 URL 都会在被索要页面上的值之前打开。你永远不会被要求粘贴自己没被派去取的东西。
- 密钥盲输。没有敏感内容回显到你的滚动记录中。
- 每个阶段都适配一个屏幕。你还需要的内容不会滚出视野。
- 按 Ctrl-C 后重新运行会从上次中断处继续,把已保存的值作为默认值提供。
- 最终屏幕列出它写的内容,并单独列出它做不到、需要你手动完成的部分。
在流程中的位置
wizard 是一个随时可调用的独立技能,坐在自动化停止、必须由人来点击的那条线上。它最近的邻居是 setup-matt-pocock-skills, because both exist to get a repo into a working state. That one configures this skill set, and wizard 为其他一切生成配置路径。它还与 implement: when a build lands a feature that needs credentials or a manual cutover, a wizard covers the steps only a human can do. When you're unsure which skill fits the moment, ask-matt 为你指路。
Skill actions
npx skills@latest add mattpocock/skillsInstalls the whole set. Then type /wizard in your coding agent.