Skills · Deep Dive · 14 min read

22 skills, one philosophy:
wrangle determinism out of a
stochastic system.

Matt Pocock 公开了他的 .agents 目录。一周读完之后,我把他每一类 skill、它们为什么存在、它们教我如何写自己的 skill,都整理成了这一篇。

CHASE · AUGUST 3, 2026
Matt Pocock skills cover: stack of skill cards next to floating leading words

22 skills · user-invoked vs model-invoked · leading words as the connective tissue

我大概一周前开始认真看 mattpocock/skills。200k stars,被 Claude Code 官方 marketplace 收录,MIT 许可——但真正打动我的是他 AI Hero 主页 上那句 "Skills For Real Engineers"

一个 skill 不是"我让 agent 做某件事"的文件。一个 skill 是 从随机系统里挤出确定性 的工程化产物。

这一篇不是教程,也不是翻译。我想做的是:把 22 个 skill 按"它解决什么失败模式"重新组织起来,让你读完知道:

  1. 他为什么写这 22 个 skill(不是 50 个、不是 10 个)
  2. 每一类 skill 的核心机制
  3. 怎么用他的思路写自己工作流里的 skill

这一篇本身有 6500 字左右。如果你赶时间,章节里都有"心智模型"小标题,可以跳着读。最后有一份完整索引。

· · ·

第 1 节:核心哲学

Matt 在 writing-great-skills/SKILL.md 里把整篇的根写得很清楚:

"A skill exists to wrangle determinism out of a stochastic system."

—— Predictability: agent 每次跑同样的 process,不是同样的 output

翻译过来就是:

这跟 superpowers(obra/superpowers,259K stars)的"TDD Iron Law"路线不同。superpowers 把工程纪律(Test-Driven / Red-Green-Refactor)做成核心约束;Matt 的路线是把"沟通纪律"做成核心约束。他观察到的 4 个失败模式,每一个的根都在"沟通不对齐":

失败模式根因Matt 的解法
#1 Agent 没做我想要的事对齐失败grill-me · grill-with-docs
#2 Agent 太啰嗦没共享语言CONTEXT.md · domain-modeling
#3 代码跑不起来反馈环太弱tdd · diagnosing-bugs
#4 代码库烂掉设计没人管improve-codebase-architecture · codebase-design

这 4 个失败模式对应 4 类 skill——也是 Matt 自己组织的逻辑:

  1. 对齐(grill):先想清楚再做
  2. 语言(domain-modeling):让 agent 和你用同一套词
  3. 反馈(tdd / bugs):让 agent 看得到自己的错
  4. 设计(codebase):保持代码库结构稳定

心智模型

他的 22 个 skill 不是"功能清单",是 4 类失败模式的工程化反制。每一类反制都用 1-2 个 user-invoked skill(你显式调用)+ 3-5 个 model-invoked skill(agent 自动抓取)组成。

· · ·

第 2 节:第一个核心机制——User-invoked vs Model-invoked

这是 Matt 整个 repo 最值钱的设计决策之一,也是他写 skill 写得比绝大多数人好的根本原因。

两者的 frontmatter 差异

---
name: grill-me
description: A relentless interview to sharpen a plan or design.
disable-model-invocation: true
---
Run a `/grilling` session.
---
name: tdd
description: Test-driven development. Use when writing new
  features or fixing bugs — strict red-green-refactor loop.
---

TDD is the red → green loop...

注意 disable-model-invocation: true 这个字段。打开它之后:

为什么要分两类?

Token 经济学。

选择标准

你的使用模式该用
只在某个具体场景手动调User-invoked
agent 在写代码时自动该用Model-invoked
需要 router 帮你挑(多个 user-invoked 共存)User-invoked + 路由器(ask-matt

心智模型

User-invoked = 任务编排器(你指挥)。Model-invoked = 行为纪律(agent 自己用)。Matt 的 repo 里有 9 个 user-invoked、9 个 model-invoked 的 engineering skill,加上 productivity 里的 4+1,比例是精心平衡的——超过 50% user-invoked 说明你"包办流程"太多,agent 自主性被压死;超过 50% model-invoked 说明你"放手太多",description 写不够精准会浪费 token。

· · ·

第 3 节:22 个 skill 完整分类

下面是我重新组织的版本——按"它解决哪一类失败模式"分类,不是按文件夹分类。

Engineering 18 个

🟦 User-invoked(9 个——你显式调用)

#Skill解决什么
1ask-matt路由器。"现在该用哪个 skill?"
2grill-with-docs边审问边建 CONTEXT.md。grill-me 升级版。
3triageissue 在状态机里流转(needs-triage → ready-for-spec → …)。
4improve-codebase-architecture扫代码库 → HTML 报告 → 挑 1 个重构机会深入讨论。
5setup-matt-pocock-skills首次配置(tracker / label / 文档位置)。每个 repo 跑 1 次。
6to-spec把当前对话合成 spec 并发布到 issue tracker。
7to-tickets把 spec/计划拆成 tracer-bullet vertical slice,带 blocker 关系。
8implement实施。在预约定 seam 触发 /tdd,提交前 /code-review
9wayfinder超大项目(一次 session 装不下)规划成 调查票地图

🟩 Model-invoked(9 个——agent 自动用)

#Skill解决什么
1prototype临时跑通一个设计问题(terminal 答状态/逻辑,多套 UI 路由切换)。
2diagnosing-bugsreproduce → minimize → hypothesise → instrument → fix → regression
3research后台 agent 查一手源 → 写带引用的 markdown。
4tdd严格 red → green → refactor,vertical slice 增量。
5domain-modeling挑战术语,边角案例压力测试,更新 CONTEXT.md
6codebase-design深度模块设计:小接口、大行为。词汇:module / interface / depth / seam / adapter。
7code-review2 轴 review:Standards(Fowler 异味)+ Spec(对齐 issue/PRD)。
8resolving-merge-conflictsgit merge/rebase 冲突。按 两边意图 逐 hunk 解。禁 --abort

Productivity 5 个

🟦 User-invoked(4 个)

#Skill解决什么
1grill-me无情审问你直到决策树所有分支都有答案。5 行——指到 grilling
2handoff压缩当前对话成 handoff 文档给下一个 agent。11 行。强调 reference 而非 duplicate。
3teach多会话教学。当前目录当工作区。100+ 行。长篇 是因为它是 teach workspace 设计。
4writing-great-skillsmeta skill——关于"如何写 skill"的 200+ 行参考。教原则不教具体步骤。

🟩 Model-invoked(1 个)

#Skill解决什么
1grillinggrill-megrill-with-docs 共享的执行核心。10 行,5 原则。

心智模型

Matt 的 复用 思路很清晰:grill-me(user-invoked, 5 行)只是 grilling(model-invoked, 10 行)的人肉入口。grill-with-docs(user-invoked)只是 grilling + domain-modeling 的组合。单点真相,多处复用——所以整个 repo 不到 1500 行 markdown。

· · ·

第 4 节:第二个核心机制——leading words

这是 Matt 写 skill 跟别人拉开差距的第二个关键点:

A leading word is a compact concept already living in the model's pretraining.

翻译:leading word = 模型已经会的概念 + 你反复用 = 行为稳定。

3 个真实例子

❌ 啰嗦版✅ leading word 版为什么
"fast, deterministic, low-overhead loop"tight loop模型对 "tight loop" 有 pretraining 概念
"a loop you believe in"red测试=红→绿是 TDD 共同语言
"be thorough"relentless模型对 "relentless" 反应更具体

为什么 leading word 工作

Matt 整个 repo 的 leading words 我列了一下:relentless, red, green, vertical, tracer-bullet, deep, seam, grill, fact, decision, scope, ship, blocking, frontier, depth, leverage, locality。注意他不是 造词——他是从软件工程几十年的共同语汇里挑出来的。

心智模型

写 skill 时花 10 分钟想 leading word,比你写 5 段详细说明更有效。leading word 像 用整个行业的共识替换你自己的啰嗦。如果你发现自己在 SKILL.md 里堆形容词,那是 leading word 还没选对的信号。

· · ·

第 5 节:5 个标志性 SKILL.md 拆解

这一节把 22 个 skill 里的 极简派和长篇派 摆在一起,让你看到他的文风跨度。

1. grill-me(5 行)—— 极简派

---
name: grill-me
description: A relentless interview to sharpen a plan or design.
disable-model-invocation: true
---
Run a `/grilling` session.

特点:

2. grilling(10 行)—— 执行核心

Interview me relentlessly about every aspect of this until
we reach a shared understanding.

Walk down each branch of the decision tree, resolving
dependencies between decisions one-by-one.

For each question, provide your recommended answer.

Ask the questions one at a time, waiting for feedback
on each question before continuing.
Asking multiple questions at once is bewildering.

If a *fact* can be found by exploring the environment
(filesystem, tools, etc.), look it up rather than asking me.
The *decisions*, though, are mine — put each one to me
and wait for my answer.

Do not act on it until I confirm we have reached a
shared understanding.

5 原则:

  1. Relentless——别客气
  2. Decision tree——一次走一条分支
  3. One at a time——一次一个问题,多个 = bewildering
  4. Fact vs Decision——事实自己查,决策交给你
  5. No premature action——不确认不行动

Fact vs Decision 是 Matt 的核心洞察。大多数人(包括我)会问"用户的预算范围是多少?",但其实"用户的预算"是 fact(可以从行业数据查),"预算 够不够买" 才是 decision(必须用户回答)。把这两类混在一起问,agent 问出来的就是噪音。

3. handoff(11 行)—— 极简派 + 引用原则

---
name: handoff
description: Compact the current conversation into a handoff
  document for another agent to pick up.
argument-hint: "What will the next session be used for?"
disable-model-invocation: true
---
Write a handoff document summarising the current conversation
so a fresh agent can continue the work. Save to the temporary
directory of the user's OS - not the current workspace.

Include a "suggested skills" section in the document, which
suggests skills that the agent should invoke.

Do not duplicate content already captured in other artifacts
(specs, plans, ADRs, issues, commits, diffs). Reference them
by path or URL instead.

Redact any sensitive information...

注意最后那行:"Do not duplicate content already captured in other artifacts. Reference them by path or URL instead." 这是 单一来源真相 原则的直接体现。如果 handoff 文档里复制了 spec 的内容,spec 改了 handoff 不会改——重复就是债务。

4. teach(100+ 行)—— 详细派

跟 grill-me 5 行完全相反。原因是它要做的事完全不同——多会话教学,需要完整的 workspace 设计:

grill-me vs teach 的对比 就是 Matt 写 skill 的两个极端:

grill-meteach
行数5100+
状态无状态多 session 状态
目的问问题建工作流
复用指到 grilling指到 RESOURCES.md / NOTES.md

5. writing-great-skills(200+ 行)—— meta skill

整篇就是"如何写 skill 的 skill"。

它本身就是 它教的东西的样板:用 leading words、用 GLOSSARY、用 information hierarchy。

心智模型

Matt 的 skill 长度 不是写出来的,是设计出来的。5 行是因为它该 5 行(路由);200 行是因为它该 200 行(meta 参考)。强行短会丢失信息,强行长会 no-op 堆积。先想"这个 skill 想让 agent 做什么动作",再决定长度。

· · ·

第 6 节:第三、第四个核心机制——Information Hierarchy & No-op 检测

Information Hierarchy(信息层级)

Matt 把信息分成 3 层:

  1. In-skill step(步骤)——主要 SKILL.md
  2. In-skill reference(参考)——也放 SKILL.md
  3. External reference(外部)——单独 .md 文件

怎么用:

内容类型放哪例子
步骤SKILL.md"1. 读 spec 2. 拆 tickets 3. 实施"
定义 / 规则SKILL.md"domain modeling: 挑战术语"
大段细节外部 .mdGLOSSARY.md / FORMAT.md

核心原则:

5 个失败模式

#失败症状防御
1Premature completionagent 跳到"做完了",实际没做完锐化完成准则
2Duplication同一意思在多处出现单一来源真相
3Sediment(沉淀)陈旧层堆积定期修剪
4Sprawl(蔓延)skill 太长,即使每行都"活着"拆 skill
5No-op那句话 agent 默认就遵守句子级 no-op 测试

No-op 检测(核心实操)

拿掉这一句,行为变了吗?没变 = no-op,删,不是改写。

这一条是 Matt 的"减肥"工具。SKILL.md 写到 50 行的时候回头看一遍,每一行问自己:拿掉它,agent 行为会变吗?答案如果是否,删。重复这个过程直到每一行都 有作用

Negation(额外陷阱)

用禁止来引导 = 反效果("不要想大象"会让你想大象)。

正向行为——"做 X",而不是"不要做 Y"。grilling 里说"Ask the questions one at a time",不说"Don't ask multiple questions at once"。这是同一个反 no-op 工具的延伸。

心智模型

Matt 写 skill 不是"写"——是 。先写一个 200 行的详尽版,然后 no-op 检测、leading word 替换、duplicate 合并,最终保留 30-50 行。"长"不是目标,"每一行都有效"是目标。

· · ·

第 7 节:两条工作流——Plan-then-Build & Domain-Driven

22 个 skill 拼起来支持 2 个核心工作流:

工作流 1:Plan-then-Build(计划 + 实施)

grill-me / grill-with-docs
        ↓
     to-spec         ← 把对话合成 spec,发布到 issue tracker
        ↓
     to-tickets      ← 拆成 vertical slice,标 blocker
        ↓
     implement       ← 在预约定 seam 触发 /tdd,提交前 /code-review
        ↓
     code-review     ← Standards + Spec 双轴

关键点:每一步之间都显式停下来,不连跑。你跑完 to-spec 之后确认 spec 写得对,才开始 to-tickets。这跟 superpowers 的 "writing-plans → executing-plans" 单线 pipeline 不同——Matt 的链条里每一步都可以 grill 重新对齐。

工作流 2:Domain-Driven(领域驱动)

grill-with-docs
        ↓
   CONTEXT.md 持续更新
        ↓
   ADR 记录决策
        ↓
   domain-modeling 持续完善
        ↓
   shared language 在 agent + dev + 团队里通用

Matt 反复强调:shared language 是这个 repo 最 cool 的技术。原因——

  1. 变量 / 函数 / 文件命名一致,代码库更易导航(agent 导航)
  2. 更少 token 思考——agent 看到 "materialization cascade" 比看到"a lesson inside a section of a course is made 'real'" 消耗 token 少 10×
  3. 变量名 = 测试名 = 文件名 = commit message,整个 repo 是一致的

他在 course-video-manager 仓库里给过一个真实例子:

后者读起来 几乎像代码。这就是 shared language 的力量。

· · ·

第 8 节:Matt vs superpowers(obra)—— 两种风格的对比

我跟过两个 repo 的笔记。同一类问题,两个解法:

维度Matt Pocockobra/superpowers
风格极简、聚焦完整方法论
SKILL.md 行数5-30 行30-200 行
核心机制facts vs decisionsTDD Iron Law
重点 1需求澄清编码纪律
重点 2领域建模系统化调试
重点 3信息层级反思
典型 leading word"relentless""test-driven"
哲学来源Pragmatic Programmer + DDDKent Beck + Pragmatic
支持 hostClaude Code / Codex(主要)11+ host(含 Cursor / Gemini / Copilot)
被 marketplace 收录Claude Code 官方Claude Code 官方
Stars200K259K

两个 repo 不互斥——superpowers 偏纪律("你必须 TDD"),Matt 偏对齐("先确认我们说的是同一件事")。纪律在执行层最重要(避免退步),对齐在规划层最重要(避免建错)。我自己的 Hermes 工作流里两个都装了——superpowers 做底座,Matt 的 4 个核心(grill-me / tdd / codebase-design / writing-great-skills)做顶层。

心智模型

把 Matt 跟 superpowers 看作 光谱的两端:对齐 ←→ 纪律、沟通 ←→ 编码、Pragmatic ←→ XP。大多数工作流问题同时需要两边,但 哪一端先做 取决于项目的阶段——0 → 1 时对齐为主(你还没建对东西呢,别着急 TDD),1 → 10 时纪律为主(你已经在执行了,别让代码库烂掉)。

· · ·

第 9 节:怎么用他的思路写自己的 skill

我读完他的 repo 之后,把自己的 skill 写作流程归纳成 5 步:

Step 1:决定 user-invoked vs model-invoked

只手动用 → user-invoked(省 context)。AI 自动用 → model-invoked(写好 description)。

Step 2:写 description(1 行 trigger)

用 leading word。"Use when X — strict Y loop" 的句式。一个 trigger 一个分支。不要堆同义词。

Step 3:写 body

前面 3-5 行说原则。中间是 step 或 reference(用 leading word 替换啰嗦)。最后是完成准则(可检查)。

Step 4:no-op 测试

把每一行拿掉,agent 行为会变吗?不会变 = 删。

Step 5:leading word 替换

把啰嗦变简洁。"be very thorough" → "relentless"。"make sure the code is right" → "vertical slice"。

我自己用这 5 步写了 3 个新 skill:

每个写完都 30-50 行。再长我就回头做 no-op 检测。

· · ·

第 10 节:完整索引

22 个 skill 加上 3 个关键 reference 文件。我做了一个表方便查:

Skill行数核心 leading word
Engineering · User-invoked
ask-mattuser~20router
grill-with-docsuser~5domain
triageuser~30state machine
improve-codebase-architectureuser~100deepening
setup-matt-pocock-skillsuser~40configure
to-specuser~50spec
to-ticketsuser~80tracer-bullet, blocking
implementuser~10seam
wayfinderuser~120frontier, fog of war
Engineering · Model-invoked
prototypemodel~40throwaway
diagnosing-bugsmodel~50reproduce, minimise
researchmodel~40primary source, cited
tddmodel~80red, green, vertical slice
domain-modelingmodel~60glossary, edge case
codebase-designmodel~100deep, seam, leverage, locality
code-reviewmodel~80standards, spec
resolving-merge-conflictsmodel~30intent, hunk
Productivity · User-invoked
grill-meuser5relentless
handoffuser11reference not duplicate
teachuser100+fluency, mission
writing-great-skillsuser200+no-op, leading word
Productivity · Model-invoked
grillingmodel10fact vs decision, relentless

22 个 skill,加上 4 个 user-invoked + 1 个 model-invoked 的 productivity 子集。

· · ·

收尾

这一篇我花了大概 2 个小时写完——不是"读",是"读 + 在自己工作流里跑一遍 + 写"。如果你只读不跑,读完你可能觉得"嗯有道理",但你写不出自己的 skill。

我建议这么读:

  1. 先看 Matt 的 README(10 分钟)——理解他为什么写 22 个而不是 100 个
  2. 挑 1 个 skill 装到你的 Claude Code / Codex(30 分钟)——grill-me 最容易起效
  3. 找一个你最近在做的项目,用 grill-me 跑 1 轮(30 分钟)
  4. writing-great-skills(30 分钟)——然后写自己的 1 个 skill

如果你只想抄一份结论:leading word + 复用 + no-op 检测。这三个工具单独用都有价值,组合起来就是 Matt 的整个 repo。

—— 写完于 2026-08-03 的周日下午。上海下暴雨。