返回 AiToEarn
1 ---
2 name: setup-matt-pocock-skills
3 description: Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
4 disable-model-invocation: true
5 ---
6
7 # Setup Matt Pocock's Skills
8
9 Scaffold the per-repo configuration that the engineering skills assume:
10
11 - **Issue tracker** — where issues live (GitHub by default; local markdown is also supported out of the box)
12 - **Triage labels** — the strings used for the five canonical triage roles
13 - **Domain docs** — where `CONTEXT.md` and ADRs live, and the consumer rules for reading them
14
15 This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
16
17 ## Process
18
19 ### 1. Explore
20
21 Look at the current repo to understand its starting state. Read whatever exists; don't assume:
22
23 - `git remote -v` and `.git/config` — is this a GitHub repo? Which one?
24 - `AGENTS.md` and `CLAUDE.md` at the repo root — does either exist? Is there already an `## Agent skills` section in either?
25 - `CONTEXT.md` and `CONTEXT-MAP.md` at the repo root
26 - `docs/adr/` and any `src/*/docs/adr/` directories
27 - `docs/agents/` — does this skill's prior output already exist?
28 - `.scratch/` — sign that a local-markdown issue tracker convention is already in use
29
30 ### 2. Present findings and ask
31
32 Summarise what's present and what's missing. Then walk the user through the three decisions **one at a time** — present a section, get the user's answer, then move to the next. Don't dump all three at once.
33
34 Assume the user does not know what these terms mean. Each section starts with a short explainer (what it is, why these skills need it, what changes if they pick differently). Then show the choices and the default.
35
36 **Section A — Issue tracker.**
37
38 > Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-issues`, `triage`, `to-prd`, 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.
39
40 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:
41
42 - **GitHub** — issues live in the repo's GitHub Issues (uses the `gh` CLI)
43 - **GitLab** — issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
44 - **Local markdown** — issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
45 - **Other** (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
46
47 **Section B — Triage label vocabulary.**
48
49 > Explainer: When the `triage` skill processes an incoming issue, it moves it through a state machine — needs evaluation, waiting on reporter, ready for an AFK agent to pick up, ready for a human, or won't fix. To do that, it needs to apply labels (or the equivalent in your issue tracker) that match strings *you've actually configured*. If your repo already uses different label names (e.g. `bug:triage` instead of `needs-triage`), map them here so the skill applies the right ones instead of creating duplicates.
50
51 The five canonical roles:
52
53 - `needs-triage` — maintainer needs to evaluate
54 - `needs-info` — waiting on reporter
55 - `ready-for-agent` — fully specified, AFK-ready (an agent can pick it up with no human context)
56 - `ready-for-human` — needs human implementation
57 - `wontfix` — will not be actioned
58
59 Default: each role's string equals its name. Ask the user if they want to override any. If their issue tracker has no existing labels, the defaults are fine.
60
61 **Section C — Domain docs.**
62
63 > Explainer: Some skills (`improve-codebase-architecture`, `diagnose`, `tdd`) read a `CONTEXT.md` file to learn the project's domain language, and `docs/adr/` for past architectural decisions. They need to know whether the repo has one global context or multiple (e.g. a monorepo with separate frontend/backend contexts) so they look in the right place.
64
65 Confirm the layout:
66
67 - **Single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root. Most repos are this.
68 - **Multi-context** — `CONTEXT-MAP.md` at the root pointing to per-context `CONTEXT.md` files (typically a monorepo).
69
70 ### 3. Confirm and edit
71
72 Show the user a draft of:
73
74 - The `## Agent skills` block to add to whichever of `CLAUDE.md` / `AGENTS.md` is being edited (see step 4 for selection rules)
75 - The contents of `docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, `docs/agents/domain.md`
76
77 Let them edit before writing.
78
79 ### 4. Write
80
81 **Pick the file to edit:**
82
83 - If `CLAUDE.md` exists, edit it.
84 - Else if `AGENTS.md` exists, edit it.
85 - If neither exists, ask the user which one to create — don't pick for them.
86
87 Never create `AGENTS.md` when `CLAUDE.md` already exists (or vice versa) — always edit the one that's already there.
88
89 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.
90
91 The block:
92
93 ```markdown
94 ## Agent skills
95
96 ### Issue tracker
97
98 [one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
99
100 ### Triage labels
101
102 [one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
103
104 ### Domain docs
105
106 [one-line summary of layout — "single-context" or "multi-context"]. See `docs/agents/domain.md`.
107 ```
108
109 Then write the three docs files using the seed templates in this skill folder as a starting point:
110
111 - [issue-tracker-github.md](./issue-tracker-github.md) — GitHub issue tracker
112 - [issue-tracker-gitlab.md](./issue-tracker-gitlab.md) — GitLab issue tracker
113 - [issue-tracker-local.md](./issue-tracker-local.md) — local-markdown issue tracker
114 - [triage-labels.md](./triage-labels.md) — label mapping
115 - [domain.md](./domain.md) — domain doc consumer rules + layout
116
117 For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
118
119 ### 5. Done
120
121 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.
122
122 lines MARKDOWN