设置 Matt Pocock 技能 (Setup Matt Pocock's Skills)
搭建工程技能所假设的每仓库配置:
Scaffold the per-repo configuration that the engineering skills assume:
- Issue 跟踪器 (Issue tracker) — issue 存放在哪里(默认 GitHub;也开箱支持本地 markdown)
Where issues 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) —
CONTEXT.md和 ADR 存放在哪里,以及读取它们的消费规则Where
CONTEXT.mdand 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.
流程 (Process)
1. 探索 (Explore)
查看当前仓库以了解其初始状态。读取已存在的内容;不要假设:
Look at the current repo to understand its starting state. Read whatever exists; don't assume:
git remote -v和.git/config— 这是 GitHub 仓库吗?哪一个?git remote -vand.git/config— is this a GitHub repo? Which one?- 仓库根目录的
AGENTS.md和CLAUDE.md— 是否存在?其中是否已有## Agent skills部分?AGENTS.mdandCLAUDE.mdat the repo root — does either exist? Is there already an## Agent skillssection in either? - 仓库根目录的
CONTEXT.md和CONTEXT-MAP.mdCONTEXT.mdandCONTEXT-MAP.mdat the repo root docs/adr/和任何src/*/docs/adr/目录docs/adr/and anysrc/*/docs/adr/directoriesdocs/agents/— 此技能的先前输出是否已存在?docs/agents/— does this skill's prior output already exist?.scratch/— 本地 markdown issue 跟踪器约定已在使用的标志.scratch/— sign that a local-markdown issue tracker convention is already in use
2. 呈现发现并询问 (Present findings and ask)
总结什么存在和什么缺失。然后一次一个引导用户通过三个决策——呈现一个部分,得到用户的答案,然后进入下一个。不要一次倾倒所有三个。
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.
部分 A — Issue 跟踪器 (Section A — Issue tracker)。
Explainer: "Issue 跟踪器"是此仓库存放 issue 的地方。像
to-issues、triage、to-prd和qa这样的技能从中读取和写入——它们需要知道是调用gh issue create、在.scratch/下写 markdown 文件,还是遵循你描述的其他工作流。选择你实际为此仓库跟踪工作的地方。 The "issue tracker" is where issues live for this repo. Skills liketo-issues,triage,to-prd, andqaread from and write to it — they need to know whether to callgh 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.
默认姿态:这些技能为 GitHub 设计。如果 git remote 指向 GitHub,提议那个。如果 git remote 指向 GitLab(gitlab.com 或自托管),提议 GitLab。否则(或如果用户偏好),提供:
Default posture: these skills were designed for GitHub. If a
git remotepoints at GitHub, propose that. If agit remotepoints at GitLab (gitlab.comor a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
- GitHub — issue 存在仓库的 GitHub Issues 中(使用
ghCLI)Issues live in the repo's GitHub Issues (uses the
ghCLI) - GitLab — issue 存在仓库的 GitLab Issues 中(使用
glabCLI)Issues live in the repo's GitLab Issues (uses the
glabCLI) - 本地 markdown (Local markdown) — issue 作为文件存放在此仓库的
.scratch/<feature>/下(适合个人项目或没有远程的仓库)Issues live as files under
.scratch/<feature>/in this repo (good for solo projects or repos without a remote) - 其他 (Other)(Jira、Linear 等)— 让用户用一段话描述工作流;技能会将其记录为自由文本
Ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
部分 B — 分诊标签词汇 (Section B — Triage label vocabulary)。
Explainer: 当
triage技能处理传入的 issue 时,它通过状态机移动它——需要评估、等待报告者、准备就绪可由 AFK agent 认领、准备就绪需人工处理、或不修复。为此,它需要应用标签(或你的 issue 跟踪器中的等效物)来匹配你实际配置的字符串。如果你的仓库已经使用不同的标签名称(例如bug:triage而不是needs-triage),在这里映射它们以便技能应用正确的标签而不是创建重复的。 When thetriageskill 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 issue tracker) that match strings you've actually configured. If your repo already uses different label names (e.g.bug:triageinstead ofneeds-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— 完全指定,AFK 就绪(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)
默认值:每个角色的字符串等于其名称。询问用户是否要覆盖。如果他们的 issue 跟踪器没有现有标签,默认值就可以了。
Default: each role's string equals its name. Ask the user if they want to override any. If their issue tracker has no existing labels, the defaults are fine.
部分 C — 领域文档 (Section C — Domain docs)。
Explainer: 一些技能(
improve-codebase-architecture、diagnose、tdd)读取CONTEXT.md文件来学习项目的领域语言,以及docs/adr/来了解过去的架构决策。它们需要知道仓库是有一个全局上下文还是多个(例如有独立前端/后端上下文的 monorepo),以便它们在正确的地方查找。 Some skills (improve-codebase-architecture,diagnose,tdd) read aCONTEXT.mdfile to learn the project's domain language, anddocs/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) — 仓库根目录一个
CONTEXT.md+docs/adr/。大多数仓库是这种。One
CONTEXT.md+docs/adr/at the repo root. Most repos are this. - 多上下文 (Multi-context) — 根目录
CONTEXT-MAP.md指向每个上下文的CONTEXT.md文件(通常是 monorepo)。CONTEXT-MAP.mdat the root pointing to per-contextCONTEXT.mdfiles (typically a monorepo).
3. 确认并编辑 (Confirm and edit)
向用户展示以下内容的草稿:
Show the user a draft of:
- 要添加到正在编辑的
CLAUDE.md/AGENTS.md的## Agent skills块(选择规则见步骤 4)The
## Agent skillsblock to add to whichever ofCLAUDE.md/AGENTS.mdis being edited (see step 4 for selection rules) docs/agents/issue-tracker.md、docs/agents/triage-labels.md、docs/agents/domain.md的内容The contents of
docs/agents/issue-tracker.md,docs/agents/triage-labels.md,docs/agents/domain.md
让用户在写入前编辑。
Let them edit before writing.
4. 写入 (Write)
选择要编辑的文件:
Pick the file to edit:
- 如果
CLAUDE.md存在,编辑它。If
CLAUDE.mdexists, edit it. - 否则如果
AGENTS.md存在,编辑它。Else if
AGENTS.mdexists, edit it. - 如果都不存在,询问用户要创建哪一个——不要替他们选择。
If neither exists, ask the user which one to create — don't pick for them.
当 CLAUDE.md 已存在时永远不要创建 AGENTS.md(反之亦然)——始终编辑已存在的那个。
Never create
AGENTS.mdwhenCLAUDE.mdalready exists (or vice versa) — always edit the one that's already there.
如果所选文件中已有 ## Agent skills 块,原地更新其内容而不是追加重复的。不要覆盖周围部分的用户编辑。
If an
## Agent skillsblock 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:
## Agent skills
### Issue tracker
[issue 跟踪位置的一行摘要]。见 `docs/agents/issue-tracker.md`。
[one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
### Triage labels
[标签词汇的一行摘要]。见 `docs/agents/triage-labels.md`。
[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
### Domain docs
[布局的一行摘要——"单上下文"或"多上下文"]。见 `docs/agents/domain.md`。
[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:
- issue-tracker-github.md — GitHub issue 跟踪器
GitHub issue tracker
- issue-tracker-gitlab.md — GitLab issue 跟踪器
GitLab issue tracker
- issue-tracker-local.md — 本地 markdown issue 跟踪器
Local-markdown issue tracker
- triage-labels.md — 标签映射
Label mapping
- domain.md — 领域文档消费规则 + 布局
Domain doc consumer rules + layout
对于"其他"issue 跟踪器,使用用户的描述从头编写 docs/agents/issue-tracker.md。
For "other" issue trackers, write
docs/agents/issue-tracker.mdfrom scratch using the user's description.
5. 完成 (Done)
告诉用户设置已完成,以及哪些工程技能现在会从这些文件读取。提及其后可以直接编辑 docs/agents/*.md——只有在他们想切换 issue 跟踪器或从头开始时才需要重新运行此技能。
Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit
docs/agents/*.mddirectly later — re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.