Setup Matt Pocock's Skills
Scaffold engineering skill 假设的 per-repo 配置:
- Issue tracker — issue 所在处(默认 GitHub;本地 markdown 也 out of the box 支持)
- Triage labels — 五个 canonical 分诊 role 使用的字符串
- Domain docs —
CONTEXT.md与 ADR 位置,及读取它们的 consumer 规则
这是 prompt-driven skill,非 deterministic script。Explore、present 发现、与用户 confirm、然后 write。
Process(流程)
1. Explore(探索)
看当前 repo 理解 starting state。Read 存在的;don't assume:
git remote -v与.git/config— 是否 GitHub repo?哪个?- Repo root 的
AGENTS.md与CLAUDE.md— 是否存在?是否已有## Agent skillssection? - Repo root 的
CONTEXT.md与CONTEXT-MAP.md docs/adr/与任何src/*/docs/adr/目录docs/agents/— 本 skill 先前 output 是否已存在?.scratch/— 表示 local-markdown issue tracker convention 已在使用
2. Present findings and ask(呈现发现并询问)
Summarise present 与 missing。然后 one at a time 带用户过三个决定——present section、得 answer、再 next。不要一次 dump 三个。
Assume 用户不知这些 term 含义。每 section 以 short explainer 开头(是什么、为何 skill 需要、选不同会怎样)。然后 show choices 与 default。
Section A — Issue tracker。
Explainer:「Issue tracker」是本 repo issue 所在处。
to-issues、triage、to-prd、qa等 skill 读写它——须知是 callgh issue create、写.scratch/下 markdown,还是你描述的其他 workflow。Pick 你实际 track 本 repo 工作的地方。
Default posture:这些 skill 为 GitHub 设计。git remote 指向 GitHub 则 propose 之。指向 GitLab(gitlab.com 或 self-hosted)则 propose GitLab。否则(或 user prefer)offer:
- GitHub — issue 在 repo GitHub Issues(用
ghCLI) - GitLab — issue 在 repo GitLab Issues(用
glabCLI) - Local markdown — issue 为本 repo
.scratch/<feature>/下文件(solo 或无 remote repo 好) - Other(Jira、Linear 等)— 请用户 one paragraph 描述 workflow;skill 记为 freeform prose
Section B — Triage label vocabulary。
Explainer:
triageskill 处理 incoming issue 时将其移过状态机——需 evaluate、等 reporter、ready for AFK agent、ready for human、或 won't fix。为此须 apply label(或 issue tracker 等价物)match 你实际配置的 字符串。若 repo 已用不同 label 名(如bug:triage而非needs-triage),在此 map,skill 才 apply 对的而非 duplicate。
五个 canonical role:
needs-triage— maintainer 需 evaluateneeds-info— 等 reporterready-for-agent— fully specified、AFK-ready(agent 可无 human context pick up)ready-for-human— 需 human implementationwontfix— 不会 action
Default:每 role 字符串等于其名。问 user 是否 override。Issue tracker 无 existing label 则 default 即可。
Section C — Domain docs。
Explainer:部分 skill(
improve-codebase-architecture、diagnose、tdd)读CONTEXT.md学项目 domain language,docs/adr/学 past architectural decision。须知 repo 是 one global context 还是 multiple(如 monorepo 分离 frontend/backend context)以便 look 对 place。
Confirm layout:
- Single-context — repo root 一个
CONTEXT.md+docs/adr/。多数 repo 如此。 - Multi-context — root
CONTEXT-MAP.md指向 per-contextCONTEXT.md(通常 monorepo)。
3. Confirm and edit(确认并编辑)
Show user draft:
- 将加到被 edit 的
CLAUDE.md/AGENTS.md的## Agent skillsblock(见 step 4 selection rules) docs/agents/issue-tracker.md、docs/agents/triage-labels.md、docs/agents/domain.md内容
Write 前 let them edit。
4. Write(写入)
Pick 要 edit 的文件:
- 若
CLAUDE.md存在,edit 它。 - Else 若
AGENTS.md存在,edit 它。 - 若都不存在,ask user 创建哪个——不要替他们 pick。
Never 在已有 CLAUDE.md 时 create AGENTS.md(或 vice versa)——始终 edit 已有的。
若 chosen file 已有 ## Agent skills block,in-place update 内容而非 append duplicate。Don't overwrite user 对 surrounding section 的 edit。
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`.
然后用本 skill 文件夹 seed template 写三个 docs 文件:
- issue-tracker-github.md — GitHub issue tracker
- issue-tracker-gitlab.md — GitLab issue tracker
- issue-tracker-local.md — local-markdown issue tracker
- triage-labels.md — label mapping
- domain.md — domain doc consumer rules + layout
「Other」issue tracker 时,用 user 描述 from scratch 写 docs/agents/issue-tracker.md。
5. Done(完成)
Tell user setup complete,哪些 engineering skill 现在从这些文件 read。提及可 later 直接 edit docs/agents/*.md——仅 switch issue tracker 或 from scratch restart 时需 re-run 本 skill。