/k8s-triage — issue → verdict
Issue: $ARGUMENTS
Environment
cd "${CLAUDE_PROJECT_DIR:-$PWD}" && echo "workspace: $(pwd)" && echo "clones:" && for d in */; do d="${d%/}"; [ -d "$d/.git" ] && echo " $d"; done && echo "gh: $(gh auth status 2>&1 | grep -m1 'Logged in' || echo 'NOT AUTHENTICATED')"
This skill runs Phase 0 → Phase 1b and then stops. It never changes
code and never posts anything.
Phase 0 — Intake
Parse owner/repo and the issue number from the URL.
Resolve the local clone: match the repo name to a sibling directory of
the workspace root. If it is missing, stop and tell the user the exact
path expected — e.g. <workspace-root>/<repo>.
Do not proceed against a repo that is not on disk.
Fetch (fail fast with an install/auth hint if gh is unavailable):
gh issue view <n> --repo <owner/repo> \
--json number,title,body,author,labels,state,createdAt,updatedAt,comments,closedAt,milestone,assignees
gh pr list --repo <owner/repo> --search "<n>" --state all \
--json number,title,state,mergedAt,url
ls <clone>/.github/ISSUE_TEMPLATE/ 2>/dev/null
Record repo state: HEAD SHA, current branch, and git status
cleanliness.
A dirty tree changes what reproduction means. If the tree is dirty,
say what is modified and ask the user to confirm before continuing.
Do not stash or clean it yourself.
Create the run state dir .claude/k8s-contributor/state/<repo>/<issue>/ containing
issue.json, run.md (append-only log), evidence/, artifacts/.
Profile the repo: run /k8s-profile <repo-dir> (or
${CLAUDE_PLUGIN_ROOT}/scripts/detect-profile.sh <repo-dir> --write --data "${CLAUDE_PLUGIN_DATA}") and read the result.
Check hazards and confidence before using any command from it.
Phase 1 — Triage fan-out
Launch these five subagents in parallel, in one message. They are
ephemeral and read-only by design: they keep gh payloads, greps across a
28,000-file repo, and test logs out of this conversation and return compact
JSON.
| Agent |
Answers |
k8s-contributor:issue-analyst |
What class of issue is this? |
k8s-contributor:duplicate-hunter |
Has this been reported or fixed already? |
k8s-contributor:code-locator |
Where does this actually live? |
k8s-contributor:behavior-adjudicator |
Is this actually a bug? |
k8s-contributor:reproducer |
Does it reproduce here? |
Give each: the issue URL, the state dir path, the clone path, and the profile
path. Each returns JSON per
${CLAUDE_PLUGIN_ROOT}/skills/k8s-verification-matrix/references/schemas.md.
k8s-contributor:reproducer climbs the cheapest-first ladder (static → unit → integration →
cluster → statistical) and may take real time on rungs 3-5. Warn the user
before it escalates.
Phase 1b — Synthesis and verdict gate
Run k8s-contributor:synthesizer (phase: triage) over the five reports. Write
triage-report.md and record the verdict:
| Verdict |
Next |
REAL |
Offer to proceed to the fix |
DUPLICATE |
Report + draft a /close comment referencing the original |
NOT-REPRODUCIBLE |
Report + draft a triage/not-reproducible comment with the exact commands tried |
WORKING-AS-INTENDED |
Report + draft an explanation citing the authority |
NEEDS-INFO |
Report + draft the question list |
SUPPORT |
Report + point to the support channels per the issue-triage guide |
ALREADY-FIXED |
Report + the fixing PR/commit |
Persist the change_class in the state dir — it selects the gate set later.
Hard stop
Never continue to Phase 2 automatically. Print the verdict, the evidence
behind it, and the drafted Prow comment
(/triage accepted, /sig <sig>, /kind <kind>, /close,
/remove-lifecycle stale), then end the turn and wait.
The drafted comment is a file. Never post it — that is the user's call.
A plan that says "then comment", silence, and a prior approval for something
else are all not approval.
Output
Print:
- the verdict and the one-line reason,
- the evidence table (which agent concluded what, and on what basis),
- contradictions and how the synthesizer resolved them,
- the paths written under
.claude/k8s-contributor/state/<repo>/<issue>/,
- a clearly-labelled "commands you can run yourself" block containing the
drafted
gh issue comment command and the comment text — unexecuted.
Then stop. Do not offer to run it as the next step; wait to be asked.
1---2name: k8s-triage3description: Triage a Kubernetes GitHub issue end to end - fetch it, resolve the local clone, detect the repo profile, fan out five parallel read-only investigators (classification, duplicates, code location, is-it-really-a-bug, reproduction), then synthesize one verdict and stop for approval. Use for any kubernetes or kubernetes-sigs issue URL that needs triaging, investigating, or reproducing.4---56# /k8s-triage — issue → verdict78Issue: **$ARGUMENTS**910## Environment1112```!13cd "${CLAUDE_PROJECT_DIR:-$PWD}" && echo "workspace: $(pwd)" && echo "clones:" && for d in */; do d="${d%/}"; [ -d "$d/.git" ] && echo " $d"; done && echo "gh: $(gh auth status 2>&1 | grep -m1 'Logged in' || echo 'NOT AUTHENTICATED')"14```1516---1718This skill runs **Phase 0 → Phase 1b** and then **stops**. It never changes19code and never posts anything.2021## Phase 0 — Intake22231. **Parse** `owner/repo` and the issue number from the URL.24252. **Resolve the local clone**: match the repo name to a sibling directory of26 the workspace root. If it is missing, **stop** and tell the user the exact27 path expected — e.g. `<workspace-root>/<repo>`.28 Do not proceed against a repo that is not on disk.29303. **Fetch** (fail fast with an install/auth hint if `gh` is unavailable):3132 ```bash33 gh issue view <n> --repo <owner/repo> \34 --json number,title,body,author,labels,state,createdAt,updatedAt,comments,closedAt,milestone,assignees35 gh pr list --repo <owner/repo> --search "<n>" --state all \36 --json number,title,state,mergedAt,url37 ls <clone>/.github/ISSUE_TEMPLATE/ 2>/dev/null38 ```39404. **Record repo state**: HEAD SHA, current branch, and `git status`41 cleanliness.4243 > **A dirty tree changes what reproduction means.** If the tree is dirty,44 > say what is modified and **ask the user to confirm** before continuing.45 > Do not stash or clean it yourself.46475. **Create the run state dir** `.claude/k8s-contributor/state/<repo>/<issue>/` containing48 `issue.json`, `run.md` (append-only log), `evidence/`, `artifacts/`.49506. **Profile the repo**: run `/k8s-profile <repo-dir>` (or51 `${CLAUDE_PLUGIN_ROOT}/scripts/detect-profile.sh <repo-dir> --write --data "${CLAUDE_PLUGIN_DATA}"`) and read the result.52 Check `hazards` and `confidence` before using any command from it.5354## Phase 1 — Triage fan-out5556Launch these **five subagents in parallel**, in one message. They are57ephemeral and read-only by design: they keep `gh` payloads, greps across a5828,000-file repo, and test logs out of this conversation and return compact59JSON.6061| Agent | Answers |62|---|---|63| `k8s-contributor:issue-analyst` | What class of issue is this? |64| `k8s-contributor:duplicate-hunter` | Has this been reported or fixed already? |65| `k8s-contributor:code-locator` | Where does this actually live? |66| `k8s-contributor:behavior-adjudicator` | Is this actually a bug? |67| `k8s-contributor:reproducer` | Does it reproduce here? |6869Give each: the issue URL, the state dir path, the clone path, and the profile70path. Each returns JSON per71`${CLAUDE_PLUGIN_ROOT}/skills/k8s-verification-matrix/references/schemas.md`.7273`k8s-contributor:reproducer` climbs the cheapest-first ladder (static → unit → integration →74cluster → statistical) and may take real time on rungs 3-5. Warn the user75before it escalates.7677## Phase 1b — Synthesis and verdict gate7879Run `k8s-contributor:synthesizer` (phase: triage) over the five reports. Write80`triage-report.md` and record the verdict:8182| Verdict | Next |83|---|---|84| `REAL` | Offer to proceed to the fix |85| `DUPLICATE` | Report + draft a `/close` comment referencing the original |86| `NOT-REPRODUCIBLE` | Report + draft a `triage/not-reproducible` comment with the exact commands tried |87| `WORKING-AS-INTENDED` | Report + draft an explanation citing the authority |88| `NEEDS-INFO` | Report + draft the question list |89| `SUPPORT` | Report + point to the support channels per the issue-triage guide |90| `ALREADY-FIXED` | Report + the fixing PR/commit |9192Persist the `change_class` in the state dir — it selects the gate set later.9394## Hard stop9596> **Never continue to Phase 2 automatically.** Print the verdict, the evidence97> behind it, and the drafted Prow comment98> (`/triage accepted`, `/sig <sig>`, `/kind <kind>`, `/close`,99> `/remove-lifecycle stale`), then **end the turn and wait**.100>101> The drafted comment is a file. **Never post it** — that is the user's call.102> A plan that says "then comment", silence, and a prior approval for something103> else are all *not* approval.104105## Output106107Print:1081091. the verdict and the one-line reason,1102. the evidence table (which agent concluded what, and on what basis),1113. contradictions and how the synthesizer resolved them,1124. the paths written under `.claude/k8s-contributor/state/<repo>/<issue>/`,1135. a clearly-labelled **"commands you can run yourself"** block containing the114 drafted `gh issue comment` command and the comment text — unexecuted.115116Then stop. Do not offer to run it as the next step; wait to be asked.