gh-issue-view

v2026.09.24

Read GitHub issues and PRs using the gh CLI. Use this skill whenever the user asks to read, view, check, or look at a GitHub issue or pull request — even if they just say "look at issue 18" or "what does

GitHub
安装命令
npx skhub add juparave/gh-issue-view
Markdown
SKILL.md

GitHub Issue / PR Viewer

The Problem

Running gh issue view <number> or gh pr view <number> without --json triggers a GraphQL error about the deprecated projectCards field (classic Projects sunset), causing exit code 1 even when the issue data is perfectly accessible. This breaks silently and wastes retries.

Always Use This Pattern

When reading an issue:

gh issue view <number> --json title,body,state,labels,assignees,comments,number,url,author,createdAt,updatedAt

When reading a PR:

gh pr view <number> --json title,body,state,labels,assignees,comments,number,url,author,createdAt,updatedAt,mergeable,mergeStateStatus,headRefName,baseRefName,reviews

Never use bare gh issue view <number> or gh pr view <number> without --json — they will fail.

Repo Detection

If not already in a git repo with a GitHub remote, or if the user specifies a repo:

gh issue view <number> --repo owner/repo --json title,body,state,...

To auto-detect the current repo:

gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null

If auto-detect fails (not a GitHub repo), ask the user for owner/repo.

Presenting the Output

After fetching, present:

  • Title and #number (with URL as a link)
  • State (open/closed) and Labels
  • Author and Created date
  • Body — render as markdown
  • Comments — show each with author + timestamp + body; collapse threads longer than 5 comments and offer to expand

Don't dump raw JSON at the user — parse and display it clearly.

Listing Issues / PRs

For listing, same rule applies — avoid fields that touch projectCards:

gh issue list --json number,title,state,labels,assignees,author,createdAt,url
gh pr list --json number,title,state,labels,assignees,author,createdAt,url,headRefName,baseRefName
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

Sep 24, 2026

分类

未分类

许可证

未指定

源路径

.claude/skills/gh-issue-view

默认分支

main

最新提交

fddb543

Tree SHA

919bc3e