setup-matt-pocock-skills
为 Matt Pocock 的 skills 做设置
Section titled “为 Matt Pocock 的 skills 做设置”为仓库搭建工程 skills 所需的配置:
- issue 跟踪器:issue 放在哪里(默认是 GitHub,也支持本地 Markdown)
- Triage 标签:五种标准 Triage 角色使用的文本
- 领域文档:
GLOSSARY.md和 ADR 的存放位置,以及读取规则
这是一个由提示词驱动的 skill,不是确定性脚本。先探索现状,再向用户说明发现并确认,最后写入配置。
查看当前仓库,了解起始状态。读取已有内容,不要想当然:
git remote -v和.git/config:这是 GitHub 仓库吗?对应哪个仓库?- 仓库根目录里的
AGENTS.md和CLAUDE.md:是否存在?其中是否已有## Agent skills章节? - 仓库根目录里的
GLOSSARY.md和GLOSSARY-MAP.md,以及旧的CONTEXT.md/CONTEXT-MAP.md。如果存在旧文件,提议用git mv将它改为对应的GLOSSARY名称,并在docs/agents/domain.md中替换这些名称。 docs/adr/和任何src/*/docs/adr/目录docs/agents/:这个 skill 之前生成的文件是否已经存在?.scratch/:这通常表示项目已经在用本地 Markdown issue 跟踪约定- 是否安装了
triageskill?查看它是否有与此 skill 并列的triage文件夹,或是否出现在可用 skills 中。这决定是否运行 B 节。 - Monorepo 信号:
pnpm-workspace.yaml、package.json的workspaces字段,或包含各自src/的非空packages/*。这些通常只出现在规模较大的多包仓库;如果都没有,说明是单一上下文,这几乎适用于所有仓库。
2. 展示发现并询问
Section titled “2. 展示发现并询问”总结现有内容和缺失项。然后按顺序逐节处理。每次只处理一节,等用户回答后再继续。
每节先给出推荐答案,让用户可以简单回复接受。只有选项确实存在分支时,才用一句话解释。如果探索结果已经决定了选项,就跳过该节(没有安装 triage 时跳过 B 节;没有 monorepo 时跳过 C 节)。
A 节:issue 跟踪器。
说明:这里的「issue 跟踪器」指这个仓库里 issue 的存放位置。
to-tickets、triage和to-spec等 skills 会从这里读取和写入 issue。它们需要知道应该调用gh issue create、在.scratch/下写 Markdown 文件,还是遵循你描述的其他流程。请选择你实际用来跟踪这个仓库任务的地方。
默认建议按以下方式选择:这些 skills 是为 GitHub 设计的。如果 git remote 指向 GitHub,就推荐 GitHub。如果指向 GitLab(gitlab.com 或自托管主机),就推荐 GitLab。其他情况,或用户有偏好时,提供以下选项:
- GitHub:issue 放在仓库的 GitHub Issues 中(使用
ghCLI) - GitLab:issue 放在仓库的 GitLab Issues 中(使用
glabCLI) - 本地 Markdown:issue 以文件形式保存在此仓库的
.scratch/<feature>/下(适合个人项目或没有远程仓库的项目) - 其他(Jira、Linear 等):请用户用一段话说明流程,skill 会按原文记录
将选择写入 docs/agents/issue-tracker.md。GitHub 和 GitLab 模板里有一个「PR 作为需求入口」开关,默认关闭。保持关闭,也不要提起。用户之后可以在文件里自行打开,让 triage 把外部 PR 纳入队列。
GitHub 或 GitLab 跟踪器需要一个可访问的仓库。如果用户选择其中一种,但没有指向相应主机的 git remote,先向用户获取仓库 URL,并配置好远程地址(如有需要,先运行 git init,再运行 git remote add origin <url>),然后再继续。完成的标准是:在当前目录运行 gh repo view / glab repo view 能显示项目;如果不行,就停止并说明缺少什么。
B 节:Triage 标签名称。 如果没有安装 triage skill,就完全跳过这一节,因为未安装的 skill 不需要标签。
如果已安装,只问一个问题:
要保留默认的 Triage 标签吗?(推荐:是)
五种标准角色及其默认标签名称相同:needs-triage、needs-info、ready-for-agent、ready-for-human、wontfix。用户回答是,就原样写入。只有用户回答否时(通常是因为跟踪器已使用其他名称,例如用 bug:triage 对应 needs-triage),才收集替代名称,让 triage 沿用已有标签,避免重复创建。
C 节:领域文档。 默认选择单一上下文(仓库根目录下一个 GLOSSARY.md 和一个 docs/adr/)。这适合几乎所有仓库,直接写入,无需询问。
只有探索发现 monorepo 信号时,才提供多上下文选项(根目录的 GLOSSARY-MAP.md 指向各上下文的 GLOSSARY.md 文件),然后确认用户想用哪种布局。
3. 确认并编辑
Section titled “3. 确认并编辑”向用户展示以下内容的草稿:
- 要添加到
CLAUDE.md或AGENTS.md中的## Agent skills代码块(如何选择文件见第 4 步) docs/agents/issue-tracker.md、docs/agents/domain.md的内容;如果已安装triage,还要展示docs/agents/triage-labels.md的内容
让用户先提出修改意见,再写入。
选择要编辑的文件:
- 如果存在
CLAUDE.md,就编辑它。 - 否则,如果存在
AGENTS.md,就编辑它。 - 如果两个都不存在,就询问用户要创建哪一个,不要自行选择。
如果选定文件中已有 ## Agent skills 代码块,就在原处更新内容,不要再追加一个重复块。
不要覆盖其他章节中的用户修改。
代码块:
## Agent skills
### Issue tracker
[一行概述 issue 的跟踪位置]。参见 `docs/agents/issue-tracker.md`。
### Triage labels
[一行概述标签名称]。参见 `docs/agents/triage-labels.md`。
### Domain docs
[一行概述文档布局:「single-context」或「multi-context」]。参见 `docs/agents/domain.md`。只有安装了 triage 且运行了 B 节时,才加入 ### Triage labels 小节并写入 docs/agents/triage-labels.md。否则两者都省略。
如果在 GitHub 或 GitLab 上运行了 B 节,就创建跟踪器里缺少的每个配置标签(使用 gh label create / glab label create)。
然后以此 skill 目录中的模板文件为基础,写入文档:
- issue-tracker-github.md:GitHub issue 跟踪器
- issue-tracker-gitlab.md:GitLab issue 跟踪器
- issue-tracker-local.md:本地 Markdown issue 跟踪器
- triage-labels.md:标签映射(仅在安装
triage时使用) - domain.md:领域文档的读取规则和布局
对于「其他」issue 跟踪器,根据用户描述从头编写 docs/agents/issue-tracker.md。
告知用户配置已完成,以及之后会读取这些文件的工程 skills。之后可以直接编辑 docs/agents/*.md;只有想切换 issue 跟踪器或从头开始时,才需要重新运行此 skill。
原文链接和 commit
Section titled “原文链接和 commit”读者要自己输入 /setup-matt-pocock-skills 才会用到它。它在 Claude Code 插件里。
为仓库配置工程 skills 所需的 issue 跟踪器、Triage 标签和领域文档布局。先探索现状并与用户确认,再写入相应配置。
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.- 仓库 mattpocock/skills
- 文件
skills/engineering/setup-matt-pocock-skills/SKILL.md - 提交
d81f3a1 - 说明页
docs/engineering/setup-matt-pocock-skills.md - 同目录文件
skills/engineering/setup-matt-pocock-skills/agents/openai.yaml - 同目录文件
skills/engineering/setup-matt-pocock-skills/domain.md - 同目录文件
skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md - 同目录文件
skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md - 同目录文件
skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md - 同目录文件
skills/engineering/setup-matt-pocock-skills/triage-labels.md
英文 SKILL.md
---name: setup-matt-pocock-skillsdescription: "Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills."disable-model-invocation: true---
# Setup Matt Pocock's Skills
Scaffold the per-repo configuration that the engineering skills assume:
- **Issue tracker**: 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**: where `GLOSSARY.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.
## Process
### 1. Explore
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?- `GLOSSARY.md` and `GLOSSARY-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/`: a sign that a local-markdown issue tracker convention is already in use- Is the `triage` skill installed? (a `triage` skill folder alongside this one, or `triage` in your available skills.) This decides whether Section B runs at all.- Monorepo signals: a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, or a populated `packages/*` with its own `src/`. These are present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
### 2. Present findings and ask
Summarise what's present and what's missing. Then take the sections in order. One section, one answer, then the next.
Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it (Section B when `triage` isn't installed, Section C when there's no monorepo).
**Section A: Issue tracker.**
> Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-tickets`, `triage`, and `to-spec` 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. If a `git remote` points at GitLab (`gitlab.com` or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
- **GitHub**: issues live in the repo's GitHub Issues (uses the `gh` CLI)- **GitLab**: issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)- **Local markdown**: issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)- **Other** (Jira, Linear, etc.): ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
Record the choice in `docs/agents/issue-tracker.md`. The GitHub and GitLab templates carry a "PRs as a request surface" flag, defaulted **off**. Leave it off and don't raise it: a user who wants external PRs in the triage queue can flip the flag in the file later.
**Section B: Triage label vocabulary.** Skip this section entirely if the `triage` skill isn't installed (exploration told you), since an uninstalled skill needs no labels.
If it is installed, ask exactly one question:
> Do you want to keep the default triage labels? (recommended: **yes**)
The defaults are the five canonical roles, each label string equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`. On **yes**, write them as-is. Only if the user says no, usually because their tracker already uses other names (e.g. `bug:triage` for `needs-triage`), collect the overrides so `triage` applies existing labels instead of creating duplicates.
**Section C: Domain docs.** Default to **single-context** (one `GLOSSARY.md` + `docs/adr/` at the repo root). This fits almost every repo; write it without asking.
Offer **multi-context** (a root `GLOSSARY-MAP.md` pointing to per-context `GLOSSARY.md` files) only when exploration found monorepo signals. Then confirm which layout they want.
### 3. Confirm and edit
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/issue-tracker.md`, `docs/agents/domain.md`, and `docs/agents/triage-labels.md` (the last only when `triage` is installed)
Let them edit before writing.
### 4. Write
**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## Agent skills
### Issue tracker
[one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
### Triage labels
[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
### Domain docs
[one-line summary of layout: "single-context" or "multi-context"]. See `docs/agents/domain.md`.```
Include the `### Triage labels` sub-block, and write `docs/agents/triage-labels.md`, only when `triage` is installed and Section B ran. When it isn't, both are omitted.
Then write the docs 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 doc consumer rules + layout
For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
### 5. Done
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 issue trackers or restart from scratch.非官方学习站,与 Matt Pocock 和 AI Hero 没有隶属关系。本站不提供可安装的中文技能包。
技能原文采用 MIT 许可。Copyright (c) 2026 Matt Pocock