GitHub Issue
Operate on GitHub issues with the gh CLI. One skill, three operations — dispatch on the user's words or the argument:
| User intent | Operation |
| --- | --- |
| "이슈 N 가져와 / 조회 / 작업", "fetch issue N", bare /github-issue 94 | Fetch |
| "이슈 등록 / 생성 / 만들어줘", "create issue", "file a bug" | Create |
| "이슈 N 수정 / 업데이트 / 코멘트 / 닫아줘", "update issue N" | Update |
If the intent is genuinely ambiguous, ask which operation — don't guess.
Common setup
- Confirm
gh auth statusworks once; if not, stop and tell the user to rungh auth login. - Default to the current repo. If the user names another repo, pass
-R <owner>/<repo>to everyghcall.
Fetch
- If no issue number was given, run
gh issue list, show the open issues, and let the user pick. gh issue view <N> --json number,title,state,labels,author,url,body,comments- Download every attachment found in the body and comments — plain curl/WebFetch returns 404 on GitHub attachment URLs. Follow fetching.md exactly (auth-token download, image Read, video → ffmpeg frames).
- Summarize in the conversation: issue number/title/labels, the problem or request in one or two lines, and what the attachments show.
- If the user is picking the issue up to work on it: locate the relevant code (grep for the symbols/strings the issue points at), state an initial hypothesis and candidate approach in a sentence or two — then stop. Do not start editing code; intake ends at understanding.
Create
-
Pick a template, in this order:
- The repo's own
.github/ISSUE_TEMPLATE/*.md|*.ymlif present — list them and match by intent. - Otherwise the bundled ones: templates/bug-report.md, templates/feature-request.md, templates/task.md.
- The repo's own
-
Fill the template from the conversation and any context the user gave. Write the issue in the language of the repo's existing issues (check a recent one if unsure). Ask only for fields you genuinely can't fill — don't interrogate.
-
Show the complete draft (title, body, labels) and wait for the user's OK before creating. Filing an issue is outward-facing and visible to others; never skip this gate.
-
Create with a body file so markdown survives quoting:
gh issue create --title "<title>" --body-file <draft.md> --label "<labels>"Only pass labels that already exist in the repo (
gh label list) —gherrors on unknown labels. Same rule for--add-labelon update. -
Report the created issue URL.
Update
- Fetch the current state first (
gh issue view <N> --json title,body,labels,state) — never edit blind. - Show what will change as before → after (title/body diff, labels added/removed, state change) and get confirmation before applying.
- Apply with the matching command:
- body/title/labels:
gh issue edit <N> --title/--body-file/--add-label/--remove-label - comment:
gh issue comment <N> --body-file <comment.md> - state:
gh issue close <N> [--comment]/gh issue reopen <N>
- body/title/labels:
- Report the issue URL and what changed.
Anti-patterns
- WRONG:
curl <attachment-url>or WebFetch ongithub.com/user-attachments/assets/...→ 404. RIGHT: download withAuthorization: token $(gh auth token)per fetching.md. - WRONG: Read a downloaded
.mp4directly (wastes a turn, shows nothing). RIGHT: extract frames with ffmpeg and Read those. - WRONG:
gh issue create/editstraight away with a body you never showed. RIGHT: full draft → user confirmation → apply. - WRONG: free-form issue body because the template "doesn't quite fit". RIGHT: pick the closest template and drop sections that are truly N/A.