At the start, state: "I am using the gh-view skill to analyze GitHub content."
Quick start
- Identify the input type (repo / issue / pr / discussion / release).
- Use
ghto pull basic information, comments, status, and code diffs. - Output conclusions: background, key points, risks, and recommended next steps.
- By default, only analyze; perform write operations only when the user explicitly requests them.
When not to use (Do NOT use)
- The user requests directly modifying code or submitting a commit.
- The user's main goal is CI root cause analysis (prefer
ci-analyze)。
Triggering examples and non-examples
- Should trigger:
- "Look at the core risk points of this PR: ."
- "Help me summarize the key discussion points of this issue."
- Should not trigger:
- "Help me directly finish modifying this PR's code and submit it."
- "This pipeline failed, help me check the logs for the root cause."
Usage examples
# 分析 PR
gh-view https://github.com/qiniu/qshell/pull/123
# 分析 issue(使用当前仓库上下文)
gh-view #456
# 查看仓库概览
gh-view qiniu/qshell
Input identification rules
- Repository:
owner/repoorhttps://github.com/owner/repo - Issue:
owner/repo/issues/<n>or#<n>(requires repo context) - PR:
owner/repo/pull/<n>or#<n>(requires repo context) - Cross-repository number:
owner/repo#<n>
Supplementary rules:
- When the input is a complete URL, first extract
owner/repoand the object number, then execute theghcommand. - When the user does not explicitly provide
repo, use by defaultqiniu/qshell。 - When structured information is needed, prefer adding
--json。
Command matrix (by object)
# 仓库
gh repo view <owner/repo>
gh repo view <owner/repo> --json name,description,defaultBranchRef,stargazerCount,forkCount,openIssuesCount
# Issue
gh issue view <n> --repo <owner/repo>
gh issue view <n> --repo <owner/repo> --comments
# PR
gh pr view <n> --repo <owner/repo>
gh pr view <n> --repo <owner/repo> --comments
gh pr diff <n> --repo <owner/repo>
gh pr checks <n> --repo <owner/repo>
Output template
目标: <repo/issue/pr>
背景: <一句话>
关键信息:
- ...
- ...
风险/阻塞:
- ...
建议下一步:
1. ...
2. ...
3. ...
Boundaries
- Use only
gh repo view/gh issue view/gh pr view/gh pr diff/gh pr checks/gh apiand other read-only commands. - Do not perform any write operations (such as
gh pr comment、gh pr merge、gh issue comment, labeling, or closing issues); when not explicitly authorized, only analyze and do not write. - When information is insufficient, ask for clarification first; do not guess.
Failure fallback
- URL parsing fails: prompt the user to check the URL format and provide a valid example.
ghcommand 403/404: check repository permissions or whether the object exists; output the actual command and error.- Insufficient information to give a conclusion: clearly mark "insufficient information" and list what was obtained and what is missing.
Acceptance criteria (unified)
- Input prerequisites: parameters and context can be parsed; missing parameters are executed according to the skill defaults and noted in the output.
- Output requirements: provide results according to the output template agreed by the skill, and include key evidence (commands, paths, links, or log summaries).
- Pass determination: the main process steps are completed and there are no blockers; if there are unfinished items, the impact scope and next steps must be clearly marked.
- Default strategy (non-interactive): when confirmation is needed but the user does not respond in time, continue with the "recommended default value/minimum-risk option"; when an interactive choice is needed, prefer the recommended option.
- Blocker escalation: when encountering missing permissions, credentials, or external dependencies, immediately stop that step and output "blocker + what has been tried + information needed from the user."
System specification (AGENTS.md)
When executing this skill, also comply with AGENTS.md the system specifications in; in case of conflict with this skill, this skill shall prevail.