1
---
2
name: scout-issue
3
description: "Use when a developer wants to find the best GitHub issues to contribute to in a repository. Invoke with /scout-issue or ask to find good first issues, beginner-friendly issues, or open source work. Asks about experience level, technical skills, time, and contribution type, then searches GitHub issues, scores them, and presents ranked recommendations with match analysis."
4
---
5
6
# Issue Scout - /scout-issue Command
7
8
Run this four-phase pipeline when the user invokes `/scout-issue` or asks for
9
help finding issues to contribute to. This skill is read-only by default:
10
inspect issues and code, but never modify issues unless the user explicitly
11
asks.
12
13
## Bundled Resources
14
15
- `references/interview.md` — intake questions, prioritization, and the internal specification format
16
- `references/scoring-rubric.md` — scoring dimensions, adaptive weights, and confidence levels
17
- `references/workflow.md` — end-to-end workflow, decision points, and edge cases
18
- `references/tool-patterns.md` — GitHub CLI, REST, and git command patterns
19
- `references/investigation-templates.md` — deep-investigation and implementation-plan output templates
20
- `references/recovery.md` — cancellation, missing tools, rate limits, and fallbacks
21
- `references/quick-reference.md` — condensed command and output reference
22
- `examples/` — worked scenarios, including `copilot-run.md`, a run against real issues
23
- `scripts/validate-skill.sh` — local consistency check for this skill
24
25
Read the relevant reference when a phase needs more detail than this file provides.
26
27
## Command Detection
28
29
**Trigger:** The user invokes `/scout-issue`, or asks for help finding issues to
30
contribute to (for example, "find me a beginner-friendly issue I could finish
31
this weekend").
32
33
**Detection:** Parse user input for `/scout-issue` anywhere in the message, or
34
recognize a request to discover and rank contribution opportunities. If
35
detected, activate this pipeline instead of normal chat.
36
37
**Examples:**
38
- `/scout-issue`
39
- `/scout-issue rust`
40
- `/scout-issue beginner-friendly`
41
- `Find a beginner-friendly Rust issue I could finish this weekend`
42
43
**Note:** If the user types `/scout-issue` again during the process, restart
44
from Phase 1. If they type `/cancel`, abort the pipeline.
45
46
## Pipeline Flow
47
48
```
49
/scout-issue invoked
50
↓
51
Phase 1: User Interrogation
52
↓
53
Phase 2: Issue Detection
54
↓
55
Phase 3: Issue Analysis & Ranking
56
↓
57
Phase 4: Output Formatting
58
↓
59
Display to User
60
```
61
62
---
63
64
## Phase 1: User Interrogation
65
66
**Goal:** Build an internal specification: experience, languages, available
67
time, contribution type, difficulty, and special requirements.
68
69
Ask the six questions in `references/interview.md`, in a single message when the
70
client supports it. Skip any question the user already answered, and do not
71
re-ask after a clarification. If the user gives no special requirements, do not
72
filter on assignment or linked-PR status.
73
74
**Output:**
75
```
76
Experience: [level]
77
Languages: [list]
78
Scope: [time estimate]
79
Type: [contribution type]
80
Difficulty: [level]
81
Special: [requirements]
82
```
83
84
---
85
86
## Phase 2: Issue Detection
87
88
**Goal:** Find candidate issues with GitHub CLI/REST and git.
89
90
### Step 1: Inspect Repository
91
92
```bash
93
repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
94
gh repo view --json name,primaryLanguage,languages
95
cat CONTRIBUTING.md 2>/dev/null || echo "No CONTRIBUTING.md"
96
git log --oneline -10
97
ls -la
98
```
99
100
### Step 2: List Candidate Issues
101
102
```bash
103
# Issue-only total. open_issues_count also counts open pull requests, so it
104
# overstates the search population.
105
gh api "search/issues?q=repo:$repo+is:issue+is:open&per_page=1" --jq '.total_count'
106
107
# Newest 100 open issues. gh issue list excludes pull requests.
108
gh issue list --state open --limit 100
109
110
# Page beyond 100 with REST. --paginate follows the API's pagination links
111
# before jq runs, so filtering pull requests cannot cut pagination short. The
112
# issues endpoint includes pull requests, so drop entries that have a
113
# pull_request field.
114
gh api "repos/$repo/issues?state=open&per_page=100" --paginate \
115
--jq '.[] | select(.pull_request == null) | .number'
116
117
# Filter by label when the user named a language, type, or difficulty hint
118
gh issue list --state open --label "bug" --limit 50
119
gh issue list --state open --label "good first issue" --limit 50
120
```
121
122
> **Note:** `gh issue list` and `gh search issues` have no `--page` flag. Use the
123
> REST issues endpoint with `--paginate` to walk every page, and always filter
124
> out entries with a non-null `pull_request` field. `gh search issues --repo
125
> "$repo" --limit N` can raise the search ceiling without pagination; `--repo`
126
> is required to keep results repository-scoped.
127
128
### Step 3: Initial Filtering
129
130
Only apply filters that match the user's explicit preferences.
131
132
Remove issues that:
133
- Are assigned, **only** when special requirements include "No active PRs
134
(unclaimed work only)".
135
- Are clearly outside the user's stated skill set.
136
137
Keep these for Phase 3 as weighted evidence, not automatic rejection:
138
- Issues with linked PRs (an **open** linked PR is competing work; closed or
139
reverted PRs are evidence only).
140
- Inactive issues (no activity for 6+ months) unless there is evidence of
141
obsolescence or the user set a recency constraint.
142
143
**Output:** Candidate issue numbers (typically 20-50).
144
145
---
146
147
## Phase 3: Issue Analysis & Ranking
148
149
> The `good first issue` label is a candidate-hunting hint only. Verify difficulty
150
> from the issue body, comments, and surrounding code before scoring.
151
152
**Goal:** Apply eligibility gates, score candidates, and rank them.
153
154
For each candidate:
155
```bash
156
gh issue view ISSUE_NUM
157
gh issue view ISSUE_NUM --comments
158
gh api "repos/$repo/issues/ISSUE_NUM/timeline" --paginate --jq '[.[] | select(.event == "cross-referenced") | select(.source.issue.pull_request != null) | select(.source.issue.state == "open") | .source.issue.number]'
159
rg "relevant_function" src/
160
find . -name "*test*" -type f | head -5
161
```
162
163
**Eligibility gates (all must pass before scoring):**
164
- The issue is open and still matches the user's hard constraints.
165
- When the user requested unclaimed work, the issue is unassigned and has no
166
open linked PR.
167
- Evidence comes from the issue body, comments, code, and tests — never from the
168
title alone.
169
- The proposed work is actionable: a location or subsystem can be identified, or
170
the missing information is called out as a risk.
171
172
**Score each eligible issue 0-100 on:** User Fit, Technical Fit, Scope Fit,
173
Difficulty Fit, Issue Quality, Activity, Contribution Feasibility, and Evidence
174
Quality.
175
176
Use the default weights (User Fit 20%, Technical Fit 15%, Scope Fit 20%,
177
Difficulty Fit 15%, Issue Quality 10%, Activity 5%, Contribution Feasibility
178
10%, Evidence Quality 5%), or the adapted weights in
179
`references/scoring-rubric.md`. Rank by weighted score and keep the evidence
180
behind each score.
181
182
**Output:** Top 5-10 issues with scores and analysis.
183
184
---
185
186
## Phase 4: Output Formatting
187
188
**Goal:** Present a ranked shortlist that a developer can act on.
189
190
**Output contract:** Top 5 maximum. For each issue show the overall match score
191
out of 100, difficulty level, estimated scope, confidence level, a brief note on
192
verification gaps, short evidence bullets, and short concerns bullets. End with
193
a single "best match" recommendation. Use emojis for visual clarity.
194
195
Use the template in `references/quick-reference.md` ("Output Format"). Mention
196
the issue-only candidate pool size and any issues excluded for competing PRs,
197
assignments, or hard constraints.
198
199
**Rules:**
200
- Show top 5 issues maximum.
201
- Explain why each issue matches and note concerns.
202
- Separate evidence from inference; never claim an issue "will definitely be
203
accepted" or is "guaranteed to work".
204
- Never skip eligibility or evidence checks for a quick-scan shortcut.
205
206
---
207
208
## Investigation Mode
209
210
**Trigger:** User says "Investigate #[NUMBER]"
211
212
**Action:** Produce the deep-investigation brief in
213
`references/investigation-templates.md`. Include the problem, why it matches,
214
relevant code and tests, related PRs/commits, implementation scope, potential
215
difficulties, maintainer expectations, effort estimate, first steps, and
216
confidence.
217
218
End with: `Want me to create an implementation plan? Say: "Plan this issue".`
219
220
---
221
222
## Implementation Planning
223
224
**Trigger:** User says "Plan this issue" or "How should I approach this?"
225
226
**Action:** Produce the implementation plan in
227
`references/investigation-templates.md`. Separate verified facts from likely
228
implementation and open questions, and include files to modify, testing
229
approach, potential challenges, time estimate, and confidence.
230
231
End with: `Ready to start? Say: "Start working on this".`
232
233
---
234
235
## Evidence Rules
236
237
- **Evidence:** what was observed — issue text, comment, code, test, timeline, or
238
assignment.
239
- **Inference:** what you conclude — likely actionable, likely accepted.
240
- Use: likely, appears, suggests, uncertain, insufficient evidence.
241
- Never: "will definitely be accepted", "guaranteed to work".
242
- Record the source for every claim; call out gaps instead of filling them.
243
244
---
245
246
## Error Handling
247
248
- **Cancel:** on `/cancel`, stop immediately and return to normal chat.
249
- **Restart:** on `/scout-issue` again, discard progress and restart Phase 1.
250
- **Missing tools, auth failures, rate limits:** explain the limitation and use
251
the fallbacks in `references/recovery.md`.
252
- **No issues found:** explain which constraints are binding and offer to relax
253
them.
254
255
---
256
257
## Important Rules
258
259
1. Never rank by title match alone.
260
2. Never trust `good first issue` or `help-wanted` labels without checking the
261
issue and surrounding code.
262
3. Never assume active from open status, or abandoned from age.
263
4. Always check for open linked PRs before recommending unclaimed work.
264
5. Always check code and tests when difficulty or feasibility matters.
265
6. Explain recommendations and rejections.
266
7. Separate evidence from inference; never invent facts.
267
8. Fewer, better recommendations beat many weak ones.
268
9. Read-only by default; never modify issues unless explicitly asked.
269
10. Handle cancellation and restart at any point.
270
271
---
272
273
## Portability
274
275
Works with any AI CLI that provides shell access, git, and optional GitHub CLI.
276
If `gh` is unavailable, use the git and web fallbacks in `references/recovery.md`
277
and state what could not be checked.
278