Read GitHub Issue
Overview
Retrieve the complete content of a GitHub issue including title, body, labels, and metadata for use in SDLC workflows. Optionally includes issue comments.
Arguments
Definitions
- •
[issue-number](required): The issue number to read (e.g.,123). - •
[--comments](optional): Include issue comments in the output.
Values
$ARGUMENTS
Core Principles
- •Verify
ghCLI is available and authenticated before attempting to read - •Return structured information that can be used by other skills
- •Include all relevant metadata (labels, milestone, assignees, state)
- •Handle non-existent issues gracefully with clear error messages
Instructions
- •
Verify the
ghCLI is available by runninggh --version - •
Parse the issue number from the command input
- •
Execute the gh command to view the issue:
codegh issue view <issue-number> --json title,body,labels,milestone,assignees,state,comments,url
- •
Parse the JSON response and format the output
- •
If
--commentsflag is provided, include all issue comments - •
If the issue doesn't exist, report a clear error message
Output Guidance
Display the issue information in a readable format.
On success: Use the template in the Templates section below.
On error:
code
Failed to retrieve issue #999: issue not found
Templates
Format the structured summary for display:
code
## Issue #<number>: <title> **State**: <open/closed> **Labels**: <label1>, <label2> **Milestone**: <milestone or N/A> **Assignees**: <assignee1>, <assignee2> or Unassigned ### Description <issue body> ### Comments (if requested) **@username** (date): <comment body>