gh-pr-review by agynio/gh-pr-review
npx skills add https://github.com/agynio/gh-pr-review --skill gh-pr-review一个 GitHub CLI 扩展,提供从终端访问完整的行内 PR 审阅评论功能,并输出适合 LLM 处理的 JSON 格式。
当你需要以下功能时,请使用此技能:
此工具特别适用于:
首先,确保扩展已安装:
gh extension install agynio/gh-pr-review
获取包含行内评论和线程回复的完整审阅上下文:
gh pr-review review view -R owner/repo --pr <number>
有用的筛选器:
--unresolved - 仅显示未解决的线程--reviewer <login> - 按特定审阅者筛选广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
--states <APPROVED|CHANGES_REQUESTED|COMMENTED|DISMISSED> - 按审阅状态筛选--tail <n> - 每个线程仅保留最后 n 条回复--not_outdated - 排除过时的线程输出: 包含审阅、评论、thread_ids 和解决状态的结构化 JSON。
回复现有的行内评论线程:
gh pr-review comments reply <pr-number> -R owner/repo \
--thread-id <PRRT_...> \
--body "您的回复消息"
获取筛选后的审阅线程列表:
gh pr-review threads list -R owner/repo <pr-number> --unresolved --mine
将线程标记为已解决:
gh pr-review threads resolve -R owner/repo <pr-number> --thread-id <PRRT_...>
开始一个待处理的审阅:
gh pr-review review --start -R owner/repo <pr-number>
向待处理审阅添加行内评论:
gh pr-review review --add-comment \
--review-id <PRR_...> \
--path <file-path> \
--line <line-number> \
--body "您的评论" \
-R owner/repo <pr-number>
提交审阅:
gh pr-review review --submit \
--review-id <PRR_...> \
--event <APPROVE|REQUEST_CHANGES|COMMENT> \
--body "总体审阅摘要" \
-R owner/repo <pr-number>
所有命令都返回为编程使用优化的结构化 JSON:
示例输出结构:
{
"reviews": [
{
"id": "PRR_...",
"state": "CHANGES_REQUESTED",
"author_login": "reviewer",
"comments": [
{
"thread_id": "PRRT_...",
"path": "src/file.go",
"author_login": "reviewer",
"body": "考虑重构此处",
"created_at": "2024-01-15T10:30:00Z",
"is_resolved": false,
"is_outdated": false,
"thread_comments": [
{
"author_login": "author",
"body": "好建议,会修复",
"created_at": "2024-01-15T11:00:00Z"
}
]
}
]
}
]
}
-R owner/repo 来明确指定仓库--unresolved 和 --not_outdated 以专注于可操作的评论review view 输出的 thread_id 值 以便回复--tail 1 通过仅保留最新回复来减少输出大小gh pr-review review view --unresolved --not_outdated -R owner/repo --pr $(gh pr view --json number -q .number)
gh pr-review threads list --unresolved -R owner/repo <pr>gh pr-review comments reply <pr> -R owner/repo --thread-id <id> --body "..."gh pr-review threads resolve <pr> -R owner/repo --thread-id <id>gh pr-review review --start -R owner/repo <pr>gh pr-review review --add-comment -R owner/repo <pr> --review-id <PRR_...> --path <file> --line <num> --body "..."gh pr-review review --submit -R owner/repo <pr> --review-id <PRR_...> --event REQUEST_CHANGES --body "摘要"[]--include-comment-node-id 标志会添加 PRRC_... ID每周安装次数
79
仓库
GitHub 星标数
98
首次出现
2026 年 1 月 28 日
安全审计
安装于
codex72
github-copilot71
opencode70
gemini-cli69
amp69
kimi-cli68
A GitHub CLI extension that provides complete inline PR review comment access from the terminal with LLM-friendly JSON output.
Use this skill when you need to:
This tool is particularly useful for:
First, ensure the extension is installed:
gh extension install agynio/gh-pr-review
Get complete review context with inline comments and thread replies:
gh pr-review review view -R owner/repo --pr <number>
Useful filters:
--unresolved - Only show unresolved threads--reviewer <login> - Filter by specific reviewer--states <APPROVED|CHANGES_REQUESTED|COMMENTED|DISMISSED> - Filter by review state--tail <n> - Keep only last n replies per thread--not_outdated - Exclude outdated threadsOutput: Structured JSON with reviews, comments, thread_ids, and resolution status.
Reply to an existing inline comment thread:
gh pr-review comments reply <pr-number> -R owner/repo \
--thread-id <PRRT_...> \
--body "Your reply message"
Get a filtered list of review threads:
gh pr-review threads list -R owner/repo <pr-number> --unresolved --mine
Mark threads as resolved:
gh pr-review threads resolve -R owner/repo <pr-number> --thread-id <PRRT_...>
Start a pending review:
gh pr-review review --start -R owner/repo <pr-number>
Add inline comments to pending review:
gh pr-review review --add-comment \
--review-id <PRR_...> \
--path <file-path> \
--line <line-number> \
--body "Your comment" \
-R owner/repo <pr-number>
Submit the review:
gh pr-review review --submit \
--review-id <PRR_...> \
--event <APPROVE|REQUEST_CHANGES|COMMENT> \
--body "Overall review summary" \
-R owner/repo <pr-number>
All commands return structured JSON optimized for programmatic use:
Example output structure:
{
"reviews": [
{
"id": "PRR_...",
"state": "CHANGES_REQUESTED",
"author_login": "reviewer",
"comments": [
{
"thread_id": "PRRT_...",
"path": "src/file.go",
"author_login": "reviewer",
"body": "Consider refactoring this",
"created_at": "2024-01-15T10:30:00Z",
"is_resolved": false,
"is_outdated": false,
"thread_comments": [
{
"author_login": "author",
"body": "Good point, will fix",
"created_at": "2024-01-15T11:00:00Z"
}
]
}
]
}
]
}
-R owner/repo to specify the repository explicitly--unresolved and --not_outdated to focus on actionable commentsreview view output for replying--tail 1 to reduce output size by keeping only latest repliesgh pr-review review view --unresolved --not_outdated -R owner/repo --pr $(gh pr view --json number -q .number)
gh pr-review threads list --unresolved -R owner/repo <pr>gh pr-review comments reply <pr> -R owner/repo --thread-id <id> --body "..."gh pr-review threads resolve <pr> -R owner/repo --thread-id <id>gh pr-review review --start -R owner/repo <pr>gh pr-review review --add-comment -R owner/repo <pr> --review-id <PRR_...> --path <file> --line <num> --body "..."gh pr-review review --submit -R owner/repo <pr> --review-id <PRR_...> --event REQUEST_CHANGES --body "Summary"[] are returned when no data matches filters--include-comment-node-id flag adds PRRC_... IDs when neededWeekly Installs
79
Repository
GitHub Stars
98
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
codex72
github-copilot71
opencode70
gemini-cli69
amp69
kimi-cli68
GitHub Actions 官方文档查询助手 - 精准解答 CI/CD 工作流问题
45,200 周安装