setup-matt-pocock-skills

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Setup Matt Pocock's Skills

配置Matt Pocock的Skills

Scaffold the per-repo configuration that the engineering skills assume:
  • Backlog — where issues/tickets live (GitHub by default; local markdown is also supported out of the box)
  • Triage labels — the strings used for the five canonical triage roles
  • Domain docs — where
    CONTEXT.md
    and ADRs live, and the consumer rules for reading them
This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
搭建工程技能所需的仓库专属配置:
  • 待办事项(Backlog) — 问题/工单的存储位置(默认是GitHub;也原生支持本地Markdown)
  • 分类标签(Triage labels) — 五个标准分类角色所使用的字符串
  • 领域文档(Domain docs)
    CONTEXT.md
    和架构决策记录(ADRs)的存储位置,以及读取这些文档的规则
这是一个由提示驱动的技能,而非确定性脚本。流程为:探查现状、展示发现、与用户确认、然后写入配置。

Process

流程

1. Explore

1. 探查

Look at the current repo to understand its starting state. Read whatever exists; don't assume:
  • git remote -v
    and
    .git/config
    — is this a GitHub repo? Which one?
  • AGENTS.md
    and
    CLAUDE.md
    at the repo root — does either exist? Is there already an
    ## Agent skills
    section in either?
  • CONTEXT.md
    and
    CONTEXT-MAP.md
    at the repo root
  • docs/adr/
    and any
    src/*/docs/adr/
    directories
  • docs/agents/
    — does this skill's prior output already exist?
  • .scratch/
    — sign that a local-markdown backlog convention is already in use
查看当前仓库以了解初始状态。读取所有已存在的内容,不要做假设:
  • git remote -v
    .git/config
    — 这是GitHub仓库吗?具体是哪个?
  • 仓库根目录下的
    AGENTS.md
    CLAUDE.md
    — 二者是否存在?其中是否已有
    ## Agent skills
    章节?
  • 仓库根目录下的
    CONTEXT.md
    CONTEXT-MAP.md
  • docs/adr/
    以及任何
    src/*/docs/adr/
    目录
  • docs/agents/
    — 本技能之前的输出是否已存在?
  • .scratch/
    — 表示已在使用本地Markdown待办事项约定的标志

2. Present findings and ask

2. 展示发现并询问

Summarise what's present and what's missing. Then walk the user through the three decisions one at a time — present a section, get the user's answer, then move to the next. Don't dump all three at once.
Assume the user does not know what these terms mean. Each section starts with a short explainer (what it is, why these skills need it, what changes if they pick differently). Then show the choices and the default.
Section A — Backlog backend.
Explainer: "Backlog" is where issues/tickets live for this repo. Skills like
to-issues
,
triage
,
to-prd
, and
qa
read from and write to it — they need to know whether to call
gh issue create
, write a markdown file under
.scratch/
, or follow some other workflow you describe. Pick the place you actually track work for this repo.
Default posture: these skills were designed for GitHub. If a
git remote
points at GitHub, propose that. Otherwise (or if the user prefers), offer:
  • GitHub — issues live in the repo's GitHub Issues
  • Local markdown — issues live as files under
    .scratch/<feature>/
    in this repo (good for solo projects or repos without a GitHub remote)
  • Other (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
Section B — Triage label vocabulary.
Explainer: When the
triage
skill processes an incoming issue, it moves it through a state machine — needs evaluation, waiting on reporter, ready for an AFK agent to pick up, ready for a human, or won't fix. To do that, it needs to apply labels (or the equivalent in your backlog) that match strings you've actually configured. If your repo already uses different label names (e.g.
bug:triage
instead of
needs-triage
), map them here so the skill applies the right ones instead of creating duplicates.
The five canonical roles:
  • needs-triage
    — maintainer needs to evaluate
  • needs-info
    — waiting on reporter
  • ready-for-agent
    — fully specified, AFK-ready (an agent can pick it up with no human context)
  • ready-for-human
    — needs human implementation
  • wontfix
    — will not be actioned
Default: each role's string equals its name. Ask the user if they want to override any. If their backlog has no existing labels, the defaults are fine.
Section C — Domain docs.
Explainer: Some skills (
improve-codebase-architecture
,
diagnose
,
tdd
) read a
CONTEXT.md
file to learn the project's domain language, and
docs/adr/
for past architectural decisions. They need to know whether the repo has one global context or multiple (e.g. a monorepo with separate frontend/backend contexts) so they look in the right place.
Confirm the layout:
  • Single-context — one
    CONTEXT.md
    +
    docs/adr/
    at the repo root. Most repos are this.
  • Multi-context
    CONTEXT-MAP.md
    at the root pointing to per-context
    CONTEXT.md
    files (typically a monorepo).
总结已存在的内容和缺失的部分。然后逐一引导用户完成三个决策 — 展示一个环节、获取用户的答案、再进入下一个环节。不要一次性抛出所有三个问题。
假设用户不了解这些术语的含义。每个环节都以简短的解释开头(是什么、这些技能为何需要它、选择不同选项会有什么变化)。然后展示选项和默认值。
环节A — 待办事项后端
解释:“待办事项(Backlog)”是本仓库中问题/工单的存储位置。
to-issues
triage
to-prd
qa
等技能会从中读取并写入内容 — 它们需要知道是调用
gh issue create
、在
.scratch/
下写入Markdown文件,还是遵循你描述的其他工作流程。请选择你实际用于跟踪本仓库工作的位置。
默认设置:这些技能是为GitHub设计的。如果
git remote
指向GitHub,则建议使用该选项。否则(或用户偏好其他选项),提供以下选择:
  • GitHub — 问题存储在仓库的GitHub Issues中
  • 本地Markdown — 问题作为文件存储在本仓库的
    .scratch/<feature>/
    下(适用于个人项目或没有GitHub远程仓库的项目)
  • 其他(Jira、Linear等) — 请用户用一段话描述工作流程;本技能会将其作为自由格式文本记录下来
环节B — 分类标签词汇
解释:当
triage
技能处理新问题时,它会通过状态机推进问题:需要评估、等待报告人回复、准备好由AFK agent接手、准备好由人工处理、或不会修复。要实现这一点,它需要应用与你实际配置的字符串匹配的标签(或待办事项系统中的等效标记)。如果你的仓库已经使用不同的标签名称(例如
bug:triage
而非
needs-triage
),请在此处映射它们,以便技能应用正确的标签而非创建重复标签。
五个标准角色:
  • needs-triage
    — 需要维护者评估
  • needs-info
    — 等待报告人回复
  • ready-for-agent
    — 已完全明确,可由AFK agent接手(无需人工上下文即可处理)
  • ready-for-human
    — 需要人工实现
  • wontfix
    — 不会采取行动
默认值:每个角色的字符串与其名称一致。询问用户是否需要覆盖任何默认值。如果你的待办事项系统没有现有标签,默认值即可。
环节C — 领域文档
解释:部分技能(
improve-codebase-architecture
diagnose
tdd
)会读取
CONTEXT.md
文件以了解项目的领域语言,并读取
docs/adr/
中的过往架构决策记录。它们需要知道仓库是采用单一全局上下文还是多上下文(例如包含独立前端/后端上下文的单体仓库),以便在正确的位置查找文档。
确认布局:
  • 单上下文 — 仓库根目录下有一个
    CONTEXT.md
    +
    docs/adr/
    。大多数仓库属于此类。
  • 多上下文 — 根目录下的
    CONTEXT-MAP.md
    指向各个上下文对应的
    CONTEXT.md
    文件(通常是单体仓库)。

3. Confirm and edit

3. 确认并编辑

Show the user a draft of:
  • The
    ## Agent skills
    block to add to whichever of
    CLAUDE.md
    /
    AGENTS.md
    is being edited (see step 4 for selection rules)
  • The contents of
    docs/agents/backlog.md
    ,
    docs/agents/triage-labels.md
    ,
    docs/agents/domain.md
Let them edit before writing.
向用户展示以下内容的草稿:
  • 要添加到
    CLAUDE.md
    /
    AGENTS.md
    中任一文件的
    ## Agent skills
    块(选择规则见步骤4)
  • docs/agents/backlog.md
    docs/agents/triage-labels.md
    docs/agents/domain.md
    的内容
让用户在写入前进行编辑。

4. Write

4. 写入

Pick the file to edit:
  • If
    CLAUDE.md
    exists, edit it.
  • Else if
    AGENTS.md
    exists, edit it.
  • If neither exists, ask the user which one to create — don't pick for them.
Never create
AGENTS.md
when
CLAUDE.md
already exists (or vice versa) — always edit the one that's already there.
If an
## Agent skills
block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
The block:
markdown
undefined
选择要编辑的文件:
  • 如果
    CLAUDE.md
    存在,则编辑它。
  • 否则如果
    AGENTS.md
    存在,则编辑它。
  • 如果二者都不存在,请询问用户要创建哪一个 — 不要自行选择。
CLAUDE.md
已存在时,切勿创建
AGENTS.md
(反之亦然) — 始终编辑已存在的文件。
如果所选文件中已存在
## Agent skills
块,请原地更新其内容,而非追加重复块。不要覆盖用户对周围章节的编辑。
块内容如下:
markdown
undefined

Agent skills

Agent skills

Backlog

Backlog

[one-line summary of where the backlog lives]. See
docs/agents/backlog.md
.
[待办事项存储位置的一行摘要]。详见
docs/agents/backlog.md

Triage labels

Triage labels

[one-line summary of the label vocabulary]. See
docs/agents/triage-labels.md
.
[标签词汇的一行摘要]。详见
docs/agents/triage-labels.md

Domain docs

Domain docs

[one-line summary of layout — "single-context" or "multi-context"]. See
docs/agents/domain.md
.

Then write the three docs files using the seed templates in this skill folder as a starting point:

- [backlog-github.md](./backlog-github.md) — GitHub backlog
- [backlog-local.md](./backlog-local.md) — local-markdown backlog
- [triage-labels.md](./triage-labels.md) — label mapping
- [domain.md](./domain.md) — domain doc consumer rules + layout

For "other" backlog backends, write `docs/agents/backlog.md` from scratch using the user's description.
[布局的一行摘要 — “单上下文”或“多上下文”]。详见
docs/agents/domain.md

然后以本技能文件夹中的种子模板为起点,写入三个文档文件:

- [backlog-github.md](./backlog-github.md) — GitHub待办事项
- [backlog-local.md](./backlog-local.md) — 本地Markdown待办事项
- [triage-labels.md](./triage-labels.md) — 标签映射
- [domain.md](./domain.md) — 领域文档读取规则 + 布局

对于“其他”待办事项后端,请根据用户的描述从头编写`docs/agents/backlog.md`。

5. Done

5. 完成

Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit
docs/agents/*.md
directly later — re-running this skill is only necessary if they want to switch backlog backends or restart from scratch.
告知用户配置已完成,以及哪些工程技能将从此读取文件。提醒用户之后可以直接编辑
docs/agents/*.md
— 只有当他们想要切换待办事项后端或从头开始重新配置时,才需要重新运行本技能。