| name | setup-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-invocation | true |
Scaffold the per-repo configuration that the engineering skills assume:
為工程技能假設的每個 repo 設定建立骨架:
CONTEXT.md and ADRs live, and the consumer rules for reading themCONTEXT.md 與 ADR 放在哪裡,以及讀取它們的消費規則This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
這是一個提示驅動的技能,不是確定性腳本。探索、呈現你所發現的、與使用者確認,然後寫入。
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 rootdocs/adr/ and any src/*/docs/adr/ directoriesdocs/agents/: does this skill's prior output already exist?.scratch/: a sign that a local-markdown issue tracker convention is already in usetriage skill installed? (a triage skill folder alongside this one, or triage in your available skills.) This decides whether Section B runs at all.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 嗎?哪一個?AGENTS.md 與 CLAUDE.md——兩者存在嗎?其中一個是否已經有 ## Agent skills 章節?CONTEXT.md 與 CONTEXT-MAP.mddocs/adr/ 與任何 src/*/docs/adr/ 目錄docs/agents/——這個技能先前的輸出是否已經存在?.scratch/——顯示本機 markdown issue 追蹤器慣例已在使用的跡象triage 技能有安裝嗎?(旁邊的 triage 技能資料夾,或在你可用的技能中。)這決定 B 章節要不要跑。pnpm-workspace.yaml、package.json 中的 workspaces 欄位,或有自己 src/ 的 packages/*。只有在真正的大型多套件 repo 中才呈現;它們不存在代表單一上下文,而幾乎每個 repo 都是。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, andto-specread 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.
說明:「issue 追蹤器」是這個 repo 的 issue 所在之處。
to-tickets、triage與to-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。否則(或使用者偏好時),提供:
gh CLI)glab CLI).scratch/<feature>/ in this repo (good for solo projects or repos without a remote)gh CLI)glab CLI).scratch/<feature>/ 下的檔案形式存在於此 repo(適合個人專案或沒有 remote 的 repo)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-triage、needs-info、ready-for-agent、ready-for-human、wontfix。答是就原樣寫入。只有當使用者說不——通常是因為他們的追蹤器已使用其他名稱(例如用 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 檔案。然後確認他們想要哪種佈局。
Show the user a draft of:
給使用者看草稿:
## Agent skills block to add to whichever of CLAUDE.md / AGENTS.md is being edited (see step 4 for selection rules)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.md、docs/agents/domain.md 與 docs/agents/triage-labels.md 的內容(最後一個只在 triage 已安裝時)Let them edit before writing.
寫入前讓他們編輯。
Pick the file to edit:
選擇要編輯的檔案:
CLAUDE.md exists, edit it.AGENTS.md exists, edit it.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:
然後用本技能資料夾中的種子模板作為起點寫文件檔案:
triage is installed)triage 已安裝時)For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description.
對「其他」issue 追蹤器,從零用使用者的描述寫 docs/agents/issue-tracker.md。
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 追蹤器或從頭重來時,才需要重跑這個技能。