Get the FREE Ultimate OpenClaw Setup Guide →

gh-issue-view

npx machina-cli add skill dceoy/github-cli-agent-skills/gh-issue-view --openclaw
Files (1)
SKILL.md
1.2 KB

GitHub Issue View

When to use

  • The user asks to see an issue's status, details, or comments.

Inputs to confirm

  • Issue number or URL.
  • Whether comments or JSON output are needed.
  • Target repo if not current (--repo OWNER/REPO).

Workflow

  1. Verify auth:
    gh --version
    gh auth status
    
  2. View issue summary:
    gh issue view 123
    
  3. View comments or JSON:
    gh issue view 123 --comments
    gh issue view 123 --json number,title,state,labels --jq '.title'
    
  4. Optional web view:
    gh issue view 123 --web
    

Examples

# Get title and state via JSON
~ gh issue view 123 --json title,state --jq '"\(.title) (\(.state))"'

Notes

  • --template supports Go templates; see gh help formatting.

References

Source

git clone https://github.com/dceoy/github-cli-agent-skills/blob/main/skills/gh-issue-view/SKILL.mdView on GitHub

Overview

gh-issue-view retrieves a GitHub issue's details, comments, and structured JSON using the gh CLI. It helps you quickly verify status, read discussions, and pull exact fields (e.g., number, title, state, labels) for automation or reporting.

How This Skill Works

The skill runs gh issue view with a user-provided issue number or URL, optionally fetching comments and JSON output. You can target a non-current repository with --repo and open a web view with --web. Authentication is validated via gh before execution, and results can be piped to tools like jq for extraction.

When to Use It

  • You need the current status and details of a specific issue.
  • You want to read recent comments on an issue.
  • You require structured JSON to feed into automation, with specific fields (e.g., number, title, state, labels).
  • You want to view an issue in a browser for quick review.
  • The issue is in a different repository and you must specify --repo OWNER/REPO.

Quick Start

  1. Step 1: gh --version && gh auth status
  2. Step 2: gh issue view <NUMBER|URL> [--comments|--json ...] [--repo OWNER/REPO]
  3. Step 3: Optional: gh issue view <NUMBER> --web or pipe output to jq for targeted data

Best Practices

  • Confirm the issue number or URL before running.
  • Decide whether you need comments, JSON, or both before execution.
  • If viewing a non-current repo, include --repo OWNER/REPO.
  • Use --json with explicit fields (e.g., number,title,state,labels) and optional --jq for extraction.
  • Leverage --web for a browser view or --comments to surface discussions.

Example Use Cases

  • Get the issue title and state via JSON: gh issue view 123 --json number,title,state --jq '.title'
  • List all comments on issue 123: gh issue view 123 --comments
  • Export key fields for automation: gh issue view 123 --json number,title,state,labels --jq '.title'
  • Open the issue in a browser: gh issue view 123 --web
  • View a cross-repo issue by specifying the repo: gh issue view 123 --repo OWNER/REPO --json number,title

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers