setup-matt-pocock-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese设置 Matt Pocock 技能
Set Up Matt Pocock Skills
搭建工程技能所依赖的逐仓库配置:
- Issue 跟踪器 — issue 放在哪里(默认 GitHub;本地 markdown 也开箱即用)
- 分类标签 — 五个规范分类角色所用的标签字符串
- 领域文档 — 和 ADR 放在哪里,以及读取它们的消费规则
CONTEXT.md
这是一个提示驱动的技能,不是确定性的脚本。探索、呈现你的发现、与用户确认,然后写入。
Set up per-repository configurations that engineering skills depend on:
- Issue Tracker — Where issues are stored (default: GitHub; local markdown works out of the box)
- Triage Labels — Label strings used for the five standard triage roles
- Domain Documentation — Where and ADRs are stored, as well as consumption rules for reading them
CONTEXT.md
This is a prompt-driven skill, not a deterministic script. Explore, present your findings, confirm with the user, then write.
流程
Process
1. 探索
1. Exploration
查看当前仓库,了解它的起始状态。读一切存在的东西;不要假设:
- 和
git remote -v— 这是 GitHub 仓库吗?是哪一个?.git/config - 仓库根目录的 和
AGENTS.md— 存在吗?里面是否已有CLAUDE.md章节?## Agent skills - 仓库根目录的 和
CONTEXT.mdCONTEXT-MAP.md - 和任何
docs/adr/目录src/*/docs/adr/ - — 这个技能之前的产出是否已存在?
docs/agents/ - — 表明本地 markdown issue 跟踪器约定已在使用的迹象
.scratch/ - 技能是否已安装?(与这个技能文件夹并列的
triage技能文件夹,或你的可用技能中有triage。)这决定 B 节是否执行。triage - Monorepo 信号 — 有 、
pnpm-workspace.yaml里有package.json字段,或有带自己的workspaces的src/。只在真正大的多包仓库里出现;没有它们就是单上下文,而几乎所有仓库都是单上下文。packages/*
Check the current repository to understand its starting state. Read everything that exists; don't make assumptions:
- and
git remote -v— Is this a GitHub repository? Which one?.git/config - and
AGENTS.mdin the repository root — Do they exist? Do they already have aCLAUDE.mdsection?## Agent skills - and
CONTEXT.mdin the repository rootCONTEXT-MAP.md - and any
docs/adr/directoriessrc/*/docs/adr/ - — Does output from a previous run of this skill already exist?
docs/agents/ - — Signs indicating that the local markdown issue tracker convention is in use
.scratch/ - Is the skill installed? (A
triageskill folder alongside this skill folder, ortriagein your available skills.) This determines whether Section B is executed.triage - Monorepo signals — Presence of , a
pnpm-workspace.yamlfield inworkspaces, orpackage.jsonwith their ownpackages/*. Only present in truly large multi-package repositories; without them, it's a single context, and almost all repositories are single-context.src/
2. 呈现发现并询问
2. Present Findings and Ask
总结哪些存在、哪些缺失。然后按顺序过各节——一节、一个回答,然后下一节。
每节先用推荐答案开头,让用户一个字就能接受。只有在选择确实分叉时才给一行解释;当探索已经解决了该节时就整节跳过(没装 时跳过 B 节,没有 monorepo 时跳过 C 节)。
triageA 节 — Issue 跟踪器。
解释:这个仓库的 "issue tracker" 就是 issue 存放的地方。、to-tickets、triage等技能会读写它——它们需要知道该调用to-spec、在gh issue create下写 markdown 文件,还是遵循你描述的其他工作流。选一个你实际为本仓库跟踪工作的位置。.scratch/
默认姿态:这些技能是为 GitHub 设计的。如果 指向 GitHub,就提议 GitHub。如果 指向 GitLab( 或自托管主机),就提议 GitLab。否则(或用户偏好),提供:
git remotegit remotegitlab.com- GitHub — issue 存在仓库的 GitHub Issues 里(使用 CLI)
gh - GitLab — issue 存在仓库的 GitLab Issues 里(使用 CLI)
glab - 本地 markdown — issue 作为 下的文件存在本仓库中(适合单人项目或没有 remote 的仓库)
.scratch/<feature>/ - 其他(Jira、Linear 等)— 让用户用一段话描述工作流;技能会把它记录为自由文本
把选择记录在 。GitHub 和 GitLab 模板带有"PRs as a request surface"(把 PR 当作请求入口)标志,默认关闭——保持关闭,不要提起它;想把外部 PR 放进分类队列的用户可以稍后在文件里打开这个标志。
docs/agents/issue-tracker.mdB 节 — 分类标签词汇。 如果 技能未安装(探索已告诉你),整节跳过——未安装的技能不需要标签。
triage如果已安装,只问一个问题:
你想保留默认的分类标签吗?(推荐:是)
默认值就是五个规范角色,每个标签字符串等于其角色名:、、、、。选是,就原样写入。只有当用户说不——通常是因为他们的跟踪器已经用了别的名字(比如用 表示 )——才收集覆盖项,这样 会应用已有标签而不是创建重复的。
needs-triageneeds-infoready-for-agentready-for-humanwontfixbug:triageneeds-triagetriageC 节 — 领域文档。 默认单上下文——仓库根目录一个 + 。这适合几乎所有仓库;不问直接写。
CONTEXT.mddocs/adr/只有当探索发现 monorepo 信号时,才提供多上下文——一个指向各上下文 文件的根级 。然后确认他们想要哪种布局。
CONTEXT.mdCONTEXT-MAP.mdSummarize what exists and what's missing. Then go through each section in order — one section, one answer, then the next.
Start each section with a recommended answer so the user can accept it with a single word. Only provide a one-line explanation if the choice actually branches; skip the entire section if exploration has already resolved it (skip Section B if is not installed, skip Section C if there's no monorepo).
triageSection A — Issue Tracker.
Explanation: The "issue tracker" for this repository is where issues are stored. Skills like,to-tickets,triagewill read from and write to it — they need to know whether to callto-spec, write markdown files undergh issue create, or follow another workflow you describe. Choose the location where you actually track work for this repository..scratch/
Default stance: These skills are designed for GitHub. If points to GitHub, propose GitHub. If points to GitLab ( or self-hosted), propose GitLab. Otherwise (or if the user prefers), provide:
git remotegit remotegitlab.com- GitHub — Issues are stored in the repository's GitHub Issues (uses CLI)
gh - GitLab — Issues are stored in the repository's GitLab Issues (uses CLI)
glab - Local Markdown — Issues exist as files under in this repository (suitable for solo projects or repositories without a remote)
.scratch/<feature>/ - Other (Jira, Linear, etc.) — Ask the user to describe the workflow in a paragraph; the skill will record it as free text
Record the choice in . GitHub and GitLab templates come with a "PRs as a request surface" flag, which is off by default — keep it off and don't mention it; users who want external PRs to be added to the triage queue can turn this flag on in the file later.
docs/agents/issue-tracker.mdSection B — Triage Label Vocabulary. If the skill is not installed (as exploration has told you), skip this entire section — uninstalled skills don't need labels.
triageIf it is installed, ask only one question:
Do you want to keep the default triage labels? (Recommended: Yes)
The default values are the five standard roles, with each label string equal to its role name: , , , , . If Yes is selected, write them as-is. Only if the user says No — usually because their tracker already uses other names (e.g., instead of ) — collect overrides so will apply existing labels instead of creating duplicates.
needs-triageneeds-infoready-for-agentready-for-humanwontfixbug:triageneeds-triagetriageSection C — Domain Documentation. Default is single-context — one + at the repository root. This is suitable for almost all repositories; write it without asking.
CONTEXT.mddocs/adr/Only if exploration finds monorepo signals, offer multi-context — a root-level pointing to each context's file. Then confirm which layout they want.
CONTEXT-MAP.mdCONTEXT.md3. 确认并编辑
3. Confirm and Edit
向用户展示草稿:
- 要加进 /
CLAUDE.md中正在编辑的那个文件的AGENTS.md块(选择规则见步骤 4)## Agent skills - 、
docs/agents/issue-tracker.md和docs/agents/domain.md的内容(最后一个仅在docs/agents/triage-labels.md已安装时)triage
写入前让他们编辑。
Show the user the draft:
- The block to be added to either
## Agent skills/CLAUDE.md(selection rules are in Step 4)AGENTS.md - Contents of ,
docs/agents/issue-tracker.mdanddocs/agents/domain.md(the last one only ifdocs/agents/triage-labels.mdis installed)triage
Let them edit before writing.
4. 写入
4. Write
选择要编辑的文件:
- 如果 存在,编辑它。
CLAUDE.md - 否则如果 存在,编辑它。
AGENTS.md - 如果都不存在,问用户要创建哪一个——不要替他们选。
当 已存在时绝不创建 (反之亦然)——总是编辑已经存在的那个。
CLAUDE.mdAGENTS.md如果所选文件中已有 块,就地更新其内容,而不是追加一份重复的。不要覆盖用户对周围章节的编辑。
## Agent skills该块:
markdown
undefinedChoose the file to edit:
- If exists, edit it.
CLAUDE.md - Otherwise, if exists, edit it.
AGENTS.md - If neither exists, ask the user which one to create — don't choose for them.
Never create if exists (and vice versa) — always edit the one that already exists.
AGENTS.mdCLAUDE.mdIf the selected file already has a block, update its content in place instead of appending a duplicate. Don't overwrite the user's edits to surrounding sections.
## Agent skillsThe block:
markdown
undefinedAgent skills
Agent skills
Issue tracker
Issue tracker
[one-line summary of where issues are tracked]. See .
docs/agents/issue-tracker.md[one-line summary of where issues are tracked]. See .
docs/agents/issue-tracker.mdTriage labels
Triage labels
[one-line summary of the label vocabulary]. See .
docs/agents/triage-labels.md[one-line summary of the label vocabulary]. See .
docs/agents/triage-labels.mdDomain docs
Domain docs
[one-line summary of layout — "single-context" or "multi-context"]. See .
docs/agents/domain.md
只有当 `triage` 已安装且 B 节执行过时,才包含 `### Triage labels` 子块并写 `docs/agents/triage-labels.md`。否则两者都省略。
然后用本技能文件夹中的种子模板作为起点写文档文件:
- [issue-tracker-github.md](./issue-tracker-github.md) — GitHub issue 跟踪器
- [issue-tracker-gitlab.md](./issue-tracker-gitlab.md) — GitLab issue 跟踪器
- [issue-tracker-local.md](./issue-tracker-local.md) — 本地 markdown issue 跟踪器
- [triage-labels.md](./triage-labels.md) — 标签映射(仅当 `triage` 已安装)
- [domain.md](./domain.md) — 领域文档消费规则 + 布局
对于"其他" issue 跟踪器,用用户的描述从头写 `docs/agents/issue-tracker.md`。[one-line summary of layout — "single-context" or "multi-context"]. See .
docs/agents/domain.md
Only include the `### Triage labels` sub-block and write `docs/agents/triage-labels.md` if `triage` is installed and Section B was executed. Otherwise, omit both.
Then write the documentation files using the seed templates in this skill folder as a starting point:
- [issue-tracker-github.md](./issue-tracker-github.md) — GitHub issue tracker
- [issue-tracker-gitlab.md](./issue-tracker-gitlab.md) — GitLab issue tracker
- [issue-tracker-local.md](./issue-tracker-local.md) — Local markdown issue tracker
- [triage-labels.md](./triage-labels.md) — Label mapping (only if `triage` is installed)
- [domain.md](./domain.md) — Domain documentation consumption rules + layout
For "Other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.5. 完成
5. Complete
告诉用户设置已完成,以及哪些工程技能现在会读取这些文件。提及他们之后可以直接编辑 ——只有想切换 issue 跟踪器或从头重来时才需要重跑本技能。
docs/agents/*.mdTell the user the setup is complete, and which engineering skills will now read these files. Mention that they can edit directly later — they only need to re-run this skill if they want to switch issue trackers or start over.
docs/agents/*.md