| name | gh-issue-comment |
| description | Add, edit, or delete GitHub issue comments using gh CLI. |
| allowed-tools | Bash, Read, Grep |
| handoffs | [{"label":"View Issue","agent":"gh-issue-view","prompt":"View this issue with all comments","send":true},{"label":"Close Issue","agent":"gh-issue-close","prompt":"Close this resolved issue","send":true}] |
GitHub Issue Comment
When to use
- The user asks to comment on an issue or post an update.
- You need to edit or delete your last comment.
Inputs to confirm
- Issue number or URL.
- Comment body (or file path).
- Whether to edit/delete the last comment.
Workflow
- Verify auth:
gh --version
gh auth status
- Post a comment:
gh issue comment 123 --body "Status update: fix in progress"
gh issue comment 123 --body-file update.md
- Edit or delete last comment if requested:
gh issue comment 123 --edit-last --body "Updated info"
gh issue comment 123 --delete-last --yes
- Confirm:
gh issue view 123 --comments
Examples
~ gh issue comment 123 --body "Working on this now."
~ gh issue comment 123 --edit-last --body "Revised ETA: tomorrow."
Notes
- Without
--body/--body-file, gh opens an interactive prompt.
--web opens the browser for composing a comment.
References