← 技能图谱 · issue-tracker-github · issue-tracker-gitlab · issue-tracker-local · 分诊标签 · 领域文档
namesetup-matt-pocock-skills
descriptionConfigure 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.
触发词为本仓库配置工程技能——设置 Issue 跟踪器、分诊标签词汇表和领域文档布局。在首次使用其他工程技能之前运行一次。
disable-model-invocationtrue

Setup Matt Pocock's Skills

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.

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 CONTEXT.md and ADRs live, and the consumer rules for reading them
  • Issue 跟踪器——Issue 存放位置(默认 GitHub;也开箱支持本地 markdown)
  • 分诊标签——用于五个标准分诊角色的字符串
  • 领域文档——CONTEXT.md 和 ADR 的存放位置,以及读取它们的使用规则

This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.

这是一个提示驱动的技能,不是确定性脚本。探索、展示发现、与用户确认,然后写入。

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 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/. Present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
  • git remote -v.git/config——这是 GitHub 仓库吗?哪个?
  • 仓库根目录的 AGENTS.mdCLAUDE.md——是否存在?其中是否已有 ## Agent skills 部分?
  • 仓库根目录的 CONTEXT.mdCONTEXT-MAP.md
  • docs/adr/ 和任何 src/*/docs/adr/ 目录
  • docs/agents/——此技能的先前输出是否已存在?
  • .scratch/——表明本地 markdown Issue 跟踪器约定已在使用
  • 是否已安装 triage 技能?(本技能旁边有 triage 技能文件夹,或可用技能中包含 triage。)这决定了 B 部分是否运行。
  • 单体仓库信号——pnpm-workspace.yamlpackage.json 中的 workspaces 字段,或带有自身 src/packages/*。只出现在真正大型的多包仓库中;没有这些信号意味着单上下文,而那几乎是所有仓库的情况。

2. Present findings and ask

2. 展示发现并询问

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).

每个部分以推荐答案开头,让用户一句话就能接受。仅当选项真正分叉时才给出一行解释;如果探索阶段已经确定了,就完全跳过该部分(triage 未安装时跳过 B 部分,没有单体仓库信号时跳过 C 部分)。

Section A — Issue tracker.

A 部分——Issue 跟踪器。

Explainer: The "issue tracker" is where issues live for this repo. Skills like to-tickets, triage, to-spec, 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.

解释:"Issue 跟踪器"是这个仓库中 Issue 存放的地方。to-ticketstriageto-specqa 等技能从中读取和写入——它们需要知道是调用 gh issue create、在 .scratch/ 下写 markdown 文件,还是遵循你描述的其他工作流。选择你实际用来跟踪此仓库工作的地方。

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 设计的。如果 git remote 指向 GitHub,则提议 GitHub。如果 git remote 指向 GitLab(gitlab.com 或自托管主机),则提议 GitLab。否则(或用户偏好),提供:

  • 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 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
  • GitHub——Issue 存放在仓库的 GitHub Issues 中(使用 gh CLI)
  • GitLab——Issue 存放在仓库的 GitLab Issues 中(使用 glab CLI)
  • 本地 markdown——Issue 以文件形式存放在仓库的 .scratch/<feature>/ 下(适合独立项目或没有远程的仓库)
  • 其他(Jira、Linear 等)——请用户用一段话描述工作流;技能会将其记录为自由文本

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.

将选择记录在 docs/agents/issue-tracker.md 中。GitHub 和 GitLab 模板带有一个"PR 作为请求入口"标志,默认关闭——保持关闭,不要主动提起;想要把外部 PR 纳入分诊队列的用户稍后可在文件中翻转该标志。

Section B — Triage label vocabulary. Skip this section entirely if the triage skill isn't installed (exploration told you) — an uninstalled skill needs no labels.

B 部分——分诊标签词汇表。如果 triage 技能未安装(探索阶段已告诉你),则完全跳过此部分——未安装的技能不需要标签。

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.

默认值就是五个标准角色,每个标签字符串都等于其名称:needs-triageneeds-infoready-for-agentready-for-humanwontfix。如果回答,原样写入即可。只有当用户说否——通常是因为其跟踪器已使用其它名称(例如 bug:triage 对应 needs-triage)——才收集覆盖项,让 triage 应用已有标签而非创建重复项。

Section C — Domain docs. Default to single-context — one CONTEXT.md + docs/adr/ at the repo root. This fits almost every repo; write it without asking.

Offer multi-context — a root CONTEXT-MAP.md pointing to per-context CONTEXT.md files — only when exploration found monorepo signals. Then confirm which layout they want.

C 部分——领域文档。默认采用单上下文——仓库根目录一个 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/issue-tracker.md, docs/agents/domain.md, and docs/agents/triage-labels.md (the last only when triage is installed)
  • 要添加到正在编辑的 CLAUDE.md / AGENTS.md 中的 ## Agent skills 块(选择规则见步骤 4)
  • docs/agents/issue-tracker.mddocs/agents/domain.md 以及 docs/agents/triage-labels.md(最后一项仅当 triage 已安装时)的内容

Let them edit before writing.

让他们在写入前编辑。

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.
  • 如果 CLAUDE.md 存在,编辑它。
  • 否则如果 AGENTS.md 存在,编辑它。
  • 如果都不存在,询问用户要创建哪一个——不要替他们选择。

Never create AGENTS.md when CLAUDE.md already exists (or vice versa) — always edit the one that's already there.

CLAUDE.md 已存在时不要创建 AGENTS.md(反之亦然)——始终编辑已存在的那个。

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.

如果所选文件中已存在 ## Agent skills 块,就地更新其内容而不是追加重复项。不要覆盖用户对周围部分的编辑。

The block:

该块:

## 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`.
## 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`。

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:

只有当 triage 已安装且 B 部分已运行时,才包含 ### Triage labels 子块,并写入 docs/agents/triage-labels.md。否则两者都省略。 然后使用此技能文件夹中的种子模板作为起点,写入文档文件:

For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description.

对于"其他"类型的 Issue 跟踪器,根据用户的描述从头编写 docs/agents/issue-tracker.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 issue trackers or restart from scratch.

告诉用户设置已完成,以及哪些工程技能现在会读取这些文件。提到他们之后可以直接编辑 docs/agents/*.md——只有当他们想切换 Issue 跟踪器或从头重新开始时才需要重新运行此技能。