ask-matt
Ask Matt
Section titled “Ask Matt”你记不住每个 skill,所以可以问。
在说明某个 skill 的作用,或建议跳过某个步骤之前,先读那个 skill 的 SKILL.md。这里的摘要只用于帮助你判断方向。
流程是沿着 skills 前进的一条路径。大多数路径会走一条主流程,另外两条入口会汇入主流程。其他 skill 要么独立使用,要么作为术语层在底层运行。
主流程:从想法到交付
Section titled “主流程:从想法到交付”这是大多数工作的路径。你有个想法,想把它做出来。
-
/grill-with-docs通过访谈把想法打磨清楚。只要你在工作目录中工作,就从这里开始:它会保留学到的内容,并写入GLOSSARY.md和架构决策记录(ADR)。如果你没有工作目录,就用/grill-me,它在「独立使用」一节介绍。两个 skill 都使用同一个/grilling基础流程;grill-with-docs会留下记录,所以只要有仓库可供记录,它就是更好的选择。 -
分支:能不能在对话中解决所有问题? 如果某个问题需要可运行的答案,比如状态、业务逻辑,或必须亲眼查看的界面,就转去做 prototype,并在两个方向上都通过
/handoff衔接(prototype 有自己的目录,这正是/handoff的用途,详见 Phase boundaries):- 先用
/handoff移交,再针对那个文件开启新会话; - 用
/prototype回答问题; - 再用
/handoff把学到的内容移交回来,并在原始想法的讨论串中引用它。
- 先用
-
分支:这是一个跨多个会话的开发任务吗?
- 是 → 用
/to-spec把讨论串整理成规格,再用/to-tickets拆成 tracer-bullet tickets,每个 ticket 都要说明自己的阻塞关系。之后可以用以下两种方式之一处理 tickets:- 每个 ticket 用一次
/implement,并在处理之间用/clear清空上下文。在本地 tracker 中,每个 ticket 是.scratch/<feature>/issues/下的一个文件,手动按阻塞顺序从前往后处理;在真实 tracker 中,这些关系会变成原生阻塞链接,所有阻塞事项都已完成的 ticket 都可以领取。每个 ticket 都是独立的,因此最后一个 ticket 的上下文可以丢弃。 - 用
/implement-spec在一次运行中完成整个规格。它会把 tickets 当作任务图,并行运行实现代理来处理已就绪的前沿任务,最后把所有内容合入一个集成分支。如果你更愿意编排整个开发过程,而不是亲自逐个推进 ticket,就用这个方式。
- 每个 ticket 用一次
- 否 → 就在这里、同一个上下文窗口中用
/implement。
无论哪种方式,代码都会通过逐个红绿切片的
/tdd来构建,并以/code-review收尾,对 diff 做双轴审查(规范 + 规格)。/implement会对每个 ticket 都执行这两个 skill;/implement-spec中的实现代理各自执行/tdd,然后对集成分支做一次/code-review。如果你只想先用测试来构建一个具体行为,就单独使用/tdd,不必先写完整规格。想按固定起点审查一个分支或 PR 时,也可以单独使用/code-review。代码以拉取请求的形式提交时,用
/pr来组织正文:放上能展示改动的最小视觉材料、改动前后的有效证据,以及单向或双向门的判断。它由模型也可以自己调用,因此代理在撰写 PR 时会主动使用它。 - 是 → 用
-
/retro用来复盘。开发结束后,特别是过程不顺时,用它回顾会话,并建议如何改进代理的工作环境,而不是代码:导航提示、自动检查、/code-review执行的编码规范、引导文件和工具。机械性错误应变成确定性检查;需要判断的事项应写成编码规范。这样,下次开发就能从更好的环境开始。
步骤 1 到 3 要放在同一个不中断的上下文窗口里(在 /to-tickets 之后才能压缩或清空),这样访谈、规格和 tickets 才能建立在同一套思路上。每次 /implement 都从全新上下文开始,围绕 ticket 工作。运行 /retro 时,要在它回顾的那个会话中、清空之前运行;清空后,就把该会话的日志交给它。
这里的限制是智能区:在这个范围内(当前先进模型约 150k token),模型仍能保持清晰推理。如果还没做到 /to-tickets,会话就快到这个范围了,不要在推理质量下降时硬撑;在最近的阶段边界使用 /compact,然后继续(见 Phase boundaries)。
从某个情境开始,产生工作,然后汇入主流程。
-
Bug 和请求不断积压 → 使用
/triage。它会让不同分诊角色处理 issues,并产出可交给代理处理的 issues,之后由/implement接手。/triage只处理不是你创建的 issues:例如 bug 报告、刚收到的功能请求,以及其他未经整理的内容。/to-tickets产出的 tickets 已经可以交给代理处理,所以不要再给它们做分诊。 -
出了故障 → 使用
/diagnosing-bugs。适合难以一眼定位的 bug、时有时无的 flake,或两个已知正常状态之间出现的回归。它要求先建立紧密反馈循环(一个运行后会因这个 bug 而失败的命令),再着手修复并添加回归测试。修复完成后,在同一个会话中运行/retro,看看怎样做能避免这个 bug;如果真正发现的问题是缺少能锁定 bug 的合适接缝,就交给/improve-codebase-architecture处理。 -
规模庞大、边界模糊的工作:从零开始的项目或大型功能,太大而无法在一次会话中完成 → 使用
/wayfinder。这是这里认知要求最高的流程。当你还看不清从当前位置到目标的路时,它会在 issue tracker 上绘制一张共享地图,列出决策 tickets,再逐一处理。过程中产出的是决策,不是交付物,直到迷雾散去、路径清晰。若/grill-with-docs能在一个会话中理清想法,就用它;wayfinder 的过程更慢、更密集,只适合这种规模的工作,别拿来处理范围明确的功能。地图清晰后,它会移交工作,但不会开始构建:回到主流程,用
/to-spec把地图中彼此关联的决策整理成可实施的计划,再照常使用/to-tickets和/implement。直接从地图跳到/implement会跳过这一步整理,还会丢掉决策之间的关联细节;只有当工作最终变得确实很小,才直接用/implement。
不是开发功能,而是做日常维护。
/improve-codebase-architecture:有空时就用它,让代理更容易在代码库中开展工作。它会找出深化机会;选定一项后就会产生一个想法,可以带到主流程里的/grill-with-docs。它负责找候选项;/codebase-design则用于深入设计选中的候选项。
两个模型也可以自己调用的参考 skill,会作为其他 skill 的底层依赖,分别负责各自领域的术语。遇到问题出在用词而非流程时,可以直接使用它们;也可以让上面的 skill 调用它们。
/domain-modeling:打磨项目的领域语言,挑战模糊术语,厘清一个词被多种方式使用的情况(比如「account」承担了三种含义),并把难以撤销的决定记录为架构决策记录(ADR)。这是/grill-with-docs使用的主动方法,用来保持GLOSSARY.md作为清晰的术语表。/codebase-design:提供关于深模块的术语,包括模块、接口、深度、接缝、适配器、杠杆和局部性,用于设计模块的形态:在干净的接缝后,用一个小接口承载大量行为。/tdd和/improve-codebase-architecture都会使用这套术语。
阶段是会话中的一段工作,比如访谈、实现或 QA。两个阶段之间的边界有五种选择,而怎么选是整张地图里最模糊的判断:
- 继续:留在当前上下文。没有成本,也不会丢失内容。
/clear:清空上下文,适用于接下来的工作用不上这里任何内容的情况。/handoff:写入可移交的 Markdown 文件。适用范围很窄:新 harness、新目录、同事,或在阶段中途拆出的旁支任务。它带来的好处是可移植性。- 子代理:把范围明确的任务交给它自己的上下文窗口,之后取回报告。
/compact:压缩当前上下文,并用压缩结果开启新会话。这是默认选择,位于决策树底部,而不是最先想到的选项。
要了解按顺序排列的决策树,包括五个问题、每个分支背后的理由,以及为什么要先排除主要来源成本导致的「继续」,请阅读 PHASE-BOUNDARIES.md。在边界处做决定;处于某个阶段中途时,就继续,或把剩余工作拆给子代理。
不属于主流程的 skill。
/grill-me:和/grill-with-docs一样进行持续追问,但它是无状态的:不在本地保存内容,也不会建立GLOSSARY.md。不在工作目录中时(比如打磨计划、设计或文章,项目下没有仓库)就用它。如果你在工作目录中,就用/grill-with-docs:它执行相同的访谈并留下记录,因此更合适。/grilling:访谈本身的基础流程,分轮推进,重点关注当前待解决的问题;事实由代理查明,决策由你来做。/grill-me和/grill-with-docs是两个入口;/triage、/wayfinder和/improve-codebase-architecture内部也会运行它。只有在你想直接访谈、不需要外层流程时,才直接使用它。/prototype:一个小型、临时的程序,用来回答一个设计问题:这种状态模型感觉如何?这个界面应该是什么样?临时是对代码写法的要求,不意味着一定要销毁它:答案会融入正式代码,而 prototype 本身会作为一手来源保留在从 main 分出的prototype/<name>分支上,并在实现 issue 中注明。这是主流程第 2 步的绕行路线,但任何难以靠讨论解决的设计问题都可以使用。/research:把资料查阅工作交给后台代理:它会依据一手来源调查问题,并在仓库中留下带引用的 Markdown 文件。它查阅期间,你可以继续工作。产出的文件可以带到主流程的/grill-with-docs中,因为研究是思考的输入,不能取代思考。/to-questionnaire:当阻碍来自你和代码库之外、而是掌握在别人手中时,就用它编写问卷让对方填写。它和/grill-me的方向相反:它会先询问你问卷发给谁、要对方提供什么,再围绕信息缺口设计问题。收回的内容可用于/grill-with-docs或/to-spec。/wizard:处理只有人才能完成的步骤,比如配置基础设施、设置凭据或 CI secrets、点击陌生的第三方控制台,或执行一次性迁移或切换。它会生成交互式 bash 脚本,打开每个 URL、收集每个值,并将值写入.env和 GitHub secrets,这样就不用每次都向代理重新解释这套流程。模型也可以自己调用这个 skill,所以代理一遇到只有你能解决的障碍就会使用它。如果代理自己能完成,就应该自己完成;只有确实需要人参与时才用它。/wait-what:当一条消息没说清楚时,用它来纠正。可以在任何其他 skill 中、对话进行到一半时调用,让代理结合你缺失的上下文,用简单易懂的英语重讲刚才的内容,并使用GLOSSARY.md中的术语。它可以事后补救;/grill-with-docs则是提前预防,因为一开始就统一语言,才能避免术语突然冒出来。/teach:跨多个会话学习一个概念,并使用当前目录作为有状态的工作区。/writing-for-agents:编写供代理使用的文档时参考,包括 skills、AGENTS.md 和指定引用的文档。
/setup-matt-pocock-skills:在第一次使用工程流程前运行,配置 issue tracker、分诊标签和其他 skills 默认使用的文档布局。也支持自定义 issue tracker。
原文链接和 commit
Section titled “原文链接和 commit”读者要自己输入 /ask-matt 才会用到它。它在 Claude Code 插件里。
Ask Matt 帮你从 Matt Pocock 的 skills 中找到适合当前情境的 skill 或工作流程,涵盖从想法到交付、故障处理、代码库维护和阶段切换。
Ask which skill or flow fits your situation. A router over the skills in this repo.- 仓库 mattpocock/skills
- 文件
skills/engineering/ask-matt/SKILL.md - 提交
d81f3a1 - 说明页
docs/engineering/ask-matt.md - 同目录文件
skills/engineering/ask-matt/agents/openai.yaml - 同目录文件
skills/engineering/ask-matt/PHASE-BOUNDARIES.md
英文 SKILL.md
---name: ask-mattdescription: Ask which skill or flow fits your situation. A router over the skills in this repo.disable-model-invocation: true---
# Ask Matt
You don't remember every skill, so ask.
Before stating what a skill does or recommending a step be skipped, read that skill's SKILL.md: the summaries here are for orientation only.
A **flow** is a path through the skills. Most paths run along one **main flow**, and two **on-ramps** merge onto it. Everything else is standalone, or a vocabulary layer that runs underneath.
## The main flow: idea → ship
The route most work travels. You have an idea and want it built.
1. **`/grill-with-docs`** sharpens the idea by interview. Start here whenever you are **working in a working directory**: it's stateful, retaining what it learns in `GLOSSARY.md` and ADRs. (No working directory? Use `/grill-me` instead, covered under Standalone. Both run the same `/grilling` primitive; `grill-with-docs` is the one that leaves a paper trail, which makes it the better of the two whenever a repo is there to leave it in.)2. **Branch: can you settle every question in conversation?** If a question needs a runnable answer (state, business logic, a UI you have to see), detour through a prototype, bridged by **`/handoff`** in both directions (a prototype lives in its own directory, which is exactly what `/handoff` is for; see Phase boundaries): - **`/handoff`** out, then open a fresh session against that file, - **`/prototype`** to answer the question with throwaway code, - **`/handoff`** back what you learned, and reference it from the original idea thread.3. **Branch: is this a multi-session build?** - **Yes** → **`/to-spec`** (turn the thread into a spec), then **`/to-tickets`** to split it into tracer-bullet tickets, each declaring its **blocking edges**. Then work the tickets one of two ways: - **`/implement`** per ticket, **`/clear`ing context between each one**. On a local tracker that's one file per ticket under `.scratch/<feature>/issues/`, worked blockers-first by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed. Each ticket is self-contained, so the last one's context is disposable. - **`/implement-spec`** for the whole spec in one run. It reads the tickets as a **task graph**, runs implementer subagents across the ready **frontier** in parallel, and lands everything on one **integration branch**. Reach for it when you'd rather orchestrate the build than drive each ticket yourself. - **No** → **`/implement`** right here, in the same context window.
Either way, the code gets built by driving **`/tdd`** (one red-green slice at a time) and closes out with **`/code-review`**, a two-axis review (Standards + Spec) of the diff. `/implement` runs both per ticket; `/implement-spec`'s implementers each drive `/tdd`, and it runs one `/code-review` over the integration branch. Reach for **`/tdd`** on its own when you just want to build a concrete behaviour test-first without a full spec, and **`/code-review`** on its own whenever you want to review a branch or PR against a fixed point.
When the work goes up as a pull request, **`/pr`** shapes the body: the smallest visual that shows the change, before/after evidence that it works, and a one-way or two-way door call. It's model-invoked, so the agent reaches for it whenever it writes a PR.
4. **`/retro`** closes the loop. After a build, and especially one that went sideways, it looks back over the session and suggests changes to the agent's **environment**, not the code: navigation pointers, automated checks, the coding standards `/code-review` enforces, steering files, tooling. Mechanical mistakes become deterministic checks; judgement calls become coding standards. The next build then starts from a better environment.
### Context hygiene
Keep steps 1–3 in **one unbroken context window** (don't compact or clear until after `/to-tickets`) so the grilling, spec, and tickets all build on the same thinking. Each `/implement` then starts fresh, working from the ticket. Run `/retro` in the session it's looking back on, before you clear; after clearing, point it at that session's log instead.
The limit on this is the **[smart zone](https://www.aihero.dev/ai-coding-dictionary/smart-zone)**: the window (~150k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before `/to-tickets`, don't push on degraded; `/compact` at the nearest phase boundary and carry on (see Phase boundaries).
## On-ramps
A starting situation that generates work, then merges onto the main flow.
- **Bugs and requests piling up** → **`/triage`**. It moves issues through triage roles and produces agent-ready issues, which **`/implement`** later picks up.
Triage is only for issues **you didn't create**: bug reports, incoming feature requests, anything that arrives raw. Tickets that `/to-tickets` produced are already agent-ready, so **don't triage them**.
- **Something's broken** → **`/diagnosing-bugs`**. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression that crept in between two known-good states. It refuses to theorise until it has a **tight feedback loop** (one command that already goes red on *this* bug), then fixes with a regression test. Once the fix is in, run **`/retro`** in the same session to ask what would have prevented the bug; where the real finding is that there's no good seam to lock it down, that's a job for **`/improve-codebase-architecture`**.
- **A huge, foggy effort: a greenfield project or a huge feature build, too big for one session** → **`/wayfinder`**, the most cognitively demanding flow here. When the way from here to the destination isn't visible yet, it charts a **shared map** of **decision tickets** on the issue tracker and resolves them one at a time, producing **decisions, not deliverables**, until the fog is pushed back and the way is clear. Where **`/grill-with-docs`** sharpens an idea you can hold in one session, wayfinder is for the idea you can't, and it's slower and denser, so save it for exactly that, never a well-scoped feature.
When the map clears, **it hands off, it doesn't build**: merge onto the main flow at **`/to-spec`**, which collapses the map's linked decisions into a buildable plan, then `/to-tickets` and `/implement` as usual. Looping the map straight into `/implement` skips that collapse and throws the linked detail away, so go straight to `/implement` only when the effort turned out genuinely small.
## Codebase health
Not feature work, just upkeep.
- **`/improve-codebase-architecture`** runs whenever you have a spare moment to keep the codebase good for agents to operate in. It surfaces **deepening opportunities**; picking one _generates an idea_ you can take into the main flow at `/grill-with-docs`. It's the survey that finds the candidates; **`/codebase-design`** (below) is the bench you design the chosen one on.
## Vocabulary underneath
Two model-invoked references that run *beneath* the other skills, each the single source of truth for its vocabulary. Reach for them directly when the **words**, not the process, are the problem; or let the skills above pull them in.
- **`/domain-modeling`**: sharpen the project's *domain* language: challenge a fuzzy term, resolve an overloaded word ("account" doing three jobs), record a hard-to-reverse decision as an ADR. It's the active discipline `/grill-with-docs` drives to keep `GLOSSARY.md` a clean glossary.- **`/codebase-design`** is the deep-module vocabulary (module, interface, depth, seam, adapter, leverage, locality) for designing a module's *shape*: a lot of behaviour behind a small interface at a clean seam. `/tdd` and `/improve-codebase-architecture` both speak it.
## Phase boundaries
A **phase** is a chunk of work inside a session: the grilling, the implementation, the QA. At the **boundary** between two of them you have five options, and picking between them is the fuzziest decision in this whole map:
- **Continue**: stay put. Costs nothing, loses nothing.- **`/clear`**: empty the window, when nothing here matters to what's next.- **`/handoff`** writes a portable markdown file. Narrow: only for a **new harness**, a **new directory**, a **colleague**, or forking a side task **mid-phase**. What it buys is portability.- **Subagent**: send a tightly-scoped task to its own window and get a report back.- **`/compact`** compresses this context and seeds a fresh session with it. The **default**, at the bottom of the tree rather than the first reach.
Read [PHASE-BOUNDARIES.md](PHASE-BOUNDARIES.md) for the ordered tree: the five questions, the reasoning behind each branch, and why the primary-source cost makes **Continue** the one to rule out first. Make the decision **at** a boundary; mid-phase, continue or split the rest into subagents.
## Standalone
Off the main flow entirely.
- **`/grill-me`**: the same relentless interview as `/grill-with-docs`, but **stateless**: it saves nothing locally and builds no `GLOSSARY.md`. Reach for it when you are **not working in a working directory** (sharpening a plan, a design, a piece of writing, anything with no repo under it). If you are in a working directory, use `/grill-with-docs` instead: it runs the same interview and leaves a paper trail, so it is strictly the better one.- **`/grilling`** is the interview primitive itself: rounds, the frontier, facts are the agent's job and decisions are yours. `/grill-me` and `/grill-with-docs` are the two named ways in, and `/triage`, `/wayfinder` and `/improve-codebase-architecture` all run it internally. Reach for it directly only when you want the interview with no wrapper around it.- **`/prototype`** is a small, throwaway program that answers one design question: does this state model feel right, or what should this UI look like. Throwaway is a constraint on how the code is written, not a promise to destroy it: the answer folds into the real code, and the prototype itself is kept as a **primary source** on a `prototype/<name>` branch out of main, pointed at from the implementation issue. It's the detour in step 2 of the main flow, but reach for it any time a design question is hard to settle on paper.- **`/research`**: delegate reading legwork to a **background agent**: it investigates a question against **primary sources**, then leaves a cited Markdown file in the repo. Keep working while it reads. The file it produces is something to take *into* the main flow at `/grill-with-docs`, since research feeds the thinking rather than replacing it.- **`/to-questionnaire`** comes in when the thing blocking you isn't in your head or the codebase but in **someone else's**, and it writes them a questionnaire to fill in. It's the inverse of `/grill-me`: instead of interviewing you about the subject, it interviews you about the **send** (who it's going to, what you need back) and aims the questions at the gap. What comes back is material for `/grill-with-docs` or `/to-spec`.- **`/wizard`** is for the steps only a **human** can take: provisioning infrastructure, setting up credentials or CI secrets, clicking through an unfamiliar third-party dashboard, running a one-off migration or cutover. It generates an interactive bash script that opens each URL, captures each value, and writes it into `.env` and GitHub secrets, so the procedure stops being something you re-explain to an agent every time. Model-invoked, so the agent reaches for it the moment it hits a wall only you can pass. If the agent could just do it itself, it should; this is for where a human is genuinely in the loop.- **`/wait-what`** is the corrective for a message that didn't land. Use it mid-conversation, inside any other skill, and the agent re-pitches what it just said with the context you were missing, in plain English, using the `GLOSSARY.md` vocabulary. It works after the fact; `/grill-with-docs` is the upfront cure, because a shared language agreed early is what stops the jargon arriving at all.- **`/teach`**: learn a concept over multiple sessions, using the current directory as a stateful workspace.- **`/writing-for-agents`** is the reference for writing documents agents consume: skills, AGENTS.md, pointed-at docs.
## Precondition
**`/setup-matt-pocock-skills`**: run before your first engineering flow to configure the issue tracker, triage labels, and doc layout the other skills assume. Custom issue trackers also work.非官方学习站,与 Matt Pocock 和 AI Hero 没有隶属关系。本站不提供可安装的中文技能包。
技能原文采用 MIT 许可。Copyright (c) 2026 Matt Pocock