Matt Pocock 工程方法论 - wizard

Model: qwen-max | ¥0.15/call
工程方法论GPT-4.1工程实践wizard

wizard:mattpocock/skills 方法论: engineering/wizard,适用于工程实践、代码质量与开发流程优化。

Calls: 1

Skill Documentation

Matt Pocock 工程方法论 - wizard

摘要

wizard:mattpocock/skills 方法论: engineering/wizard,适用于工程实践、代码质量与开发流程优化。

> 来源: mattpocock/skills (141k stars) — Total TypeScript 创始人 Matt Pocock

> 类目: 工程方法论

> 原文件: skills/engineering/wizard/SKILL.md

> 模型推荐: gpt-4.1 (代码工程)

这个 skill 是干嘛的

Matt Pocock (Total TypeScript, 141k stars) 沉淀下来的"日常代码工程动作"skill 模板。

每一个对应一个具体动作(代码评审 / TDD / 重构 / 文档对齐 / 任务交接),不是工具,是"该怎么干这件事"的工作流模板。

michael 强调"skill 要有相应的指导功能,指导用户使用",所以这里加了下面两节让 Agent 和用户对接。

---

🤖 Agent 使用说明

1. 接到任务后先按这个 skill 的检查清单走一遍

2. 清单里如果出现"先做 X 才能做 Y"的红线 → 必须先完成 X

3. 跑完清单后开始动手(改代码 / 写文档 / 评审)

4. 完工前用 `verification-before-completion`(superpowers) 或 `verification` 类 step 自检

5. 任务量大时考虑用 `dispatching-parallel-agents`(superpowers) 或 `wayfinder`(mattpocock) 拆解

👤 用户需要做什么?

1. 告诉 Agent 你要做什么(一句话即可)

2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文

3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答

4. 完工后让 Agent 跑一遍自检再交回

5. 整个过程 Agent 自动化,不需要手工介入

---

原 skill 内容(mattpocock/skills/engineering/wizard/SKILL.md)

---

name: wizard

description: Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

---

Wizard

A **wizard** is a bash script that walks a human, step by step, through a manual procedure that's tedious to do by hand and tedious to re-explain to an AI every time. It opens each URL, says exactly what to click and copy, captures the values, writes them where they belong (`.env`, GitHub secrets), confirms at every stage, and shows how many stages are left. It might configure third-party services, run a one-off migration, or move the project from one state to another.

The delightful UX is already solved by [template.sh](template.sh) — stage-by-stage progress, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent `.env` upserts, `gh secret`/`gh variable` writes, and a closing summary. **Your job is only to scope the procedure and author its stages.** The library above the `STAGES` marker is identical in every wizard; that consistency is the point — never hand-edit it.

A wizard is ephemeral by default — built for one run, saved to a scratch or `scripts/` path, deleted when the job's done. Commit it only when the user wants a repeatable setup path that should live in the repo.

Process

1. Scope the procedure

Work out every manual step the human must take and every value that gets captured along the way. Read the repo first — don't ask cold:

Then show the user the ordered list of stages and the values each produces, and confirm — they may add, drop, or reorder.

**Done when:** every stage is named in order, and for each captured value you know (a) where the human gets it, (b) where it's written (`.env`, a GitHub secret, both, or nowhere — some stages are pure actions), and (c) whether it's secret (hidden entry) or public.

2. Map each stage's journey

For each stage, write the precise path a human follows: which URL to open, what to do there, where a value is shown, which variable it fills — e.g. "Dashboard → Developers → API keys → Reveal test key → copy". Where you don't actually know the current UI or the exact command, say so and ask the user or check the docs — never invent steps that may not exist.

**Done when:** every stage traces to concrete instructions a stranger could follow.

3. Author the wizard

Copy `template.sh` to the target path. Replace the example stage with one `stage` per step, in dependency order. Use the library helpers — `stage`, `say`/`step`, `open_url`, `ask`/`ask_secret`, `write_env`, `set_secret`/`set_var`, `pause`/`confirm` — and set `TOTAL_STAGES` to the number of stages you wrote.

Hold the bar the template sets: open the URL before asking for its value, use `ask_secret` for anything secret, `write_env` every persisted value, `set_secret` only the values CI actually needs, and `confirm` before any irreversible action. Each `stage` clears the screen so only the current step is visible — keep a stage to one focused task so nothing the human needs scrolls away. Don't touch the library above the marker.

4. Verify and hand off

常见问题(FAQ)

使用「wizard」这个 skill 能解决什么问题?

本 skill 专注于wizard,mattpocock/skills 方法论: engineering/wizard。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。

什么情况下适合使用「wizard」?

当你需要在wizard相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。

使用「wizard」前需要准备什么?

需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。

FAQ

👤 用户需要做什么?

1. 告诉 Agent 你要做什么(一句话即可)

2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文

3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答

4. 完工后让 Agent 跑一遍自检再交回

5. 整个过程 Agent 自动化,不需要手工介入

---

使用「wizard」这个 skill 能解决什么问题?

本 skill 专注于wizard,mattpocock/skills 方法论: engineering/wizard。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。

什么情况下适合使用「wizard」?

当你需要在wizard相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。

使用「wizard」前需要准备什么?

需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。