|
| 1 | +--- |
| 2 | +name: github-issues |
| 3 | +description: Manage GitHub issues using the `gh` CLI. Use when the user asks to list, view, create, edit, close, reopen, comment on, or search GitHub issues. |
| 4 | +tools: Bash |
| 5 | +--- |
| 6 | + |
| 7 | +# GitHub Issues Skill |
| 8 | + |
| 9 | +This project's repository is `benchmark-action/github-action-benchmark`. Always use `-R benchmark-action/github-action-benchmark` unless the user explicitly specifies a different repo. |
| 10 | + |
| 11 | +## Common Operations |
| 12 | + |
| 13 | +### List issues |
| 14 | +```bash |
| 15 | +gh issue list -R benchmark-action/github-action-benchmark |
| 16 | +gh issue list -R benchmark-action/github-action-benchmark --state all |
| 17 | +gh issue list -R benchmark-action/github-action-benchmark --state closed |
| 18 | +gh issue list -R benchmark-action/github-action-benchmark --label "bug" |
| 19 | +gh issue list -R benchmark-action/github-action-benchmark --assignee "@me" |
| 20 | +gh issue list -R benchmark-action/github-action-benchmark --author monalisa |
| 21 | +gh issue list -R benchmark-action/github-action-benchmark --search "error no:assignee" |
| 22 | +gh issue list -R benchmark-action/github-action-benchmark --limit 100 |
| 23 | +gh issue list -R benchmark-action/github-action-benchmark --json number,title,state,labels,url |
| 24 | +``` |
| 25 | + |
| 26 | +### View an issue |
| 27 | +```bash |
| 28 | +gh issue view 123 -R benchmark-action/github-action-benchmark |
| 29 | +gh issue view 123 -R benchmark-action/github-action-benchmark --comments |
| 30 | +gh issue view 123 -R benchmark-action/github-action-benchmark --json title,body,comments,labels,assignees,state,url |
| 31 | +``` |
| 32 | + |
| 33 | +### Create an issue |
| 34 | +```bash |
| 35 | +gh issue create -R benchmark-action/github-action-benchmark --title "Title" --body "Body" |
| 36 | +gh issue create -R benchmark-action/github-action-benchmark --title "Bug" --label "bug" --assignee "@me" |
| 37 | +gh issue create -R benchmark-action/github-action-benchmark --web |
| 38 | +``` |
| 39 | + |
| 40 | +### Edit an issue |
| 41 | +```bash |
| 42 | +gh issue edit 123 -R benchmark-action/github-action-benchmark --title "New title" |
| 43 | +gh issue edit 123 -R benchmark-action/github-action-benchmark --body "Updated body" |
| 44 | +gh issue edit 123 -R benchmark-action/github-action-benchmark --add-label "priority:high" --remove-label "triage" |
| 45 | +gh issue edit 123 -R benchmark-action/github-action-benchmark --add-assignee "@me" |
| 46 | +``` |
| 47 | + |
| 48 | +### Close / Reopen |
| 49 | +```bash |
| 50 | +gh issue close 123 -R benchmark-action/github-action-benchmark |
| 51 | +gh issue close 123 -R benchmark-action/github-action-benchmark --reason "not planned" |
| 52 | +gh issue reopen 123 -R benchmark-action/github-action-benchmark |
| 53 | +``` |
| 54 | + |
| 55 | +### Comment on an issue |
| 56 | +```bash |
| 57 | +gh issue comment 123 -R benchmark-action/github-action-benchmark --body "My comment" |
| 58 | +``` |
| 59 | + |
| 60 | +### Pin / Unpin |
| 61 | +```bash |
| 62 | +gh issue pin 123 -R benchmark-action/github-action-benchmark |
| 63 | +gh issue unpin 123 -R benchmark-action/github-action-benchmark |
| 64 | +``` |
| 65 | + |
| 66 | +## Workflow |
| 67 | + |
| 68 | +1. **Determine the intent** from the user's request (list, view, create, edit, close, comment, etc.) |
| 69 | +2. **Always pass** `-R benchmark-action/github-action-benchmark` unless the user says otherwise |
| 70 | +3. **Run the appropriate `gh issue` command** using the Bash tool |
| 71 | +4. **Present the output** clearly; for `--json` output, summarize the relevant fields rather than dumping raw JSON |
| 72 | + |
| 73 | +## Tips |
| 74 | + |
| 75 | +- Issue numbers and URLs are both valid arguments |
| 76 | +- Use `--json fields` + `--jq expression` for precise filtering |
| 77 | +- `gh issue status -R benchmark-action/github-action-benchmark` shows issues relevant to you |
0 commit comments