| 1 | --- |
| 2 | name: github |
| 3 | description: GitHub via gh — issues, PRs, reviews, search, and CI runs. Use when: user mentions a repo, issue, PR, review, release, workflow run, or anything on github.com. |
| 4 | invocation: model+user |
| 5 | --- |
| 6 | |
| 7 | # GitHub |
| 8 | |
| 9 | ## When to use |
| 10 | Any GitHub work: read or triage issues, open or review PRs, search code, |
| 11 | check CI runs, manage releases. |
| 12 | |
| 13 | ## Setup |
| 14 | Requires the `gh` CLI, authenticated. Fail loud when it is missing: |
| 15 | |
| 16 | ``` |
| 17 | gh auth status || gh auth login |
| 18 | ``` |
| 19 | |
| 20 | Never proceed with `curl` against api.github.com as a silent fallback — |
| 21 | `gh` owns auth, pagination, and output shape. |
| 22 | |
| 23 | ## Workflow |
| 24 | 1. Confirm the repo (`owner/name`) and, for mutations, the exact target. |
| 25 | 2. Read: `gh issue view`, `gh pr view`, `gh pr diff`, `gh search`, `gh run view`. |
| 26 | 3. Mutate only when asked: `gh issue create`, `gh pr create`, `gh pr review`, |
| 27 | `gh pr merge`. Mutations need explicit user intent, not inference. |
| 28 | 4. Quote what `gh` returned; never summarize a diff or check rollup you did not read. |
| 29 | |
| 30 | ## Non-goals |
| 31 | - Do not merge, close, or approve on your own initiative. |
| 32 | - Do not invent issue/PR numbers or check conclusions. |
| 33 | - Do not push, retag, or rewrite history without explicit authorization. |
| 34 |