namesetup-matt-pocock-skills
description (EN)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.
說明 (繁中)為工程技能設定這個 repo——設定它的 issue 追蹤器、分診標籤詞彙與領域文件佈局。首次使用其他工程技能前執行一次。
disable-model-invocationtrue

setup-matt-pocock-skills

開工前先把場地佈好:tracker 用哪個、標籤怎麼分、文件放哪。

Setup Matt Pocock's Skills

設定 Matt Pocock 的技能

Scaffold the per-repo configuration that the engineering skills assume:

為工程技能假設的每個 repo 設定建立骨架:

  • 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:

檢視目前 repo,理解它的起點狀態。讀任何存在的東西;不要臆測:

  • 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/: 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.
  • git remote -v.git/config——這是 GitHub repo 嗎?哪一個?
  • repo 根目錄的 AGENTS.mdCLAUDE.md——兩者存在嗎?其中一個是否已經有 ## Agent skills 章節?
  • repo 根目錄的 CONTEXT.mdCONTEXT-MAP.md
  • docs/adr/ 與任何 src/*/docs/adr/ 目錄
  • docs/agents/——這個技能先前的輸出是否已經存在?
  • .scratch/——顯示本機 markdown issue 追蹤器慣例已在使用的跡象
  • triage 技能有安裝嗎?(旁邊的 triage 技能資料夾,或在你可用的技能中。)這決定 B 章節要不要跑。
  • Monorepo 訊號——pnpm-workspace.yamlpackage.json 中的 workspaces 欄位,或有自己 src/packages/*。只有在真正的大型多套件 repo 中才呈現;它們不存在代表單一上下文,而幾乎每個 repo 都是。

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 章節、沒有 monorepo 時跳過 C 章節)。

Section A: Issue tracker.

A 章節——Issue 追蹤器。

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.

說明:「issue 追蹤器」是這個 repo 的 issue 所在之處。to-ticketstriageto-spec 等技能會讀寫它——它們需要知道該呼叫 gh issue create、在 .scratch/ 下寫 markdown 檔案,還是遵循你描述的其他工作流程。選一個你實際用來追蹤這個 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 設計的。如果 git remote 指向 GitHub,提出 GitHub。如果 git remote 指向 GitLab(gitlab.com 或自架的 host),提出 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 存在 repo 的 GitHub Issues(使用 gh CLI)
  • GitLab——issue 存在 repo 的 GitLab Issues(使用 glab CLI)
  • 本機 markdown——issue 以 .scratch/<feature>/ 下的檔案形式存在於此 repo(適合個人專案或沒有 remote 的 repo)
  • 其他(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 模板帶有「PRs as a request surface」旗標,預設關閉——保持關閉且不要提起它;想要外部 PR 進分診佇列的使用者可以之後在檔案中開啟該旗標。

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.

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.

C 章節——領域文件。 預設單一上下文——repo 根目錄一份 CONTEXT.md + docs/adr/。這適合幾乎每個 repo;不用問就寫。

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.

只有當探索發現 monorepo 訊號時,才提供多上下文——根目錄的 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 其中一個(見第 4 步的選擇規則)的 ## Agent skills 區塊
  • docs/agents/issue-tracker.mddocs/agents/domain.mddocs/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

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

只在 triage 已安裝且 B 章節有跑時,包含 ### Triage labels 子區塊並寫 docs/agents/triage-labels.md。沒安裝時,兩者都省略。

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

然後用本技能資料夾中的種子模板作為起點寫文件檔案:

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 追蹤器或從頭重來時,才需要重跑這個技能。