一键导入
gh-review-comments
List, reply to, resolve, unresolve, and create GitHub PR review comment threads using gh CLI scripts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
List, reply to, resolve, unresolve, and create GitHub PR review comment threads using gh CLI scripts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Staff-engineer-level code review that goes beyond correctness to evaluate architectural alignment, system-level implications, failure modes, performance, scalability, backward compatibility, observability, security, and cross-team impact. Use when reviewing a PR (URL or diff), analyzing code changes for architectural fitness, or when the user asks for a thorough/staff-level/senior review of code changes. Triggers on "review this PR", "review these changes", "staff review", "thorough code review", sharing a GitHub PR URL for review, or asking about the architectural impact of changes.
Produce a daily AI news digest and reuse the source workflow under `claude/ai-daily-digest`. Use when the user wants a curated AI briefing or roundup in Codex.
Clean stale local branches and worktrees by reusing the source workflow under `claude/git-clean-gone`. Use when merged or abandoned work leaves gone branches behind.
Stage selected git hunks non-interactively by reusing the source workflow under `claude/git-stage-hunk`. Use when only part of a file should be committed.
Review Go code using the source material under `claude/go-code-review`. Use when the user wants a focused Go review grounded in known failure patterns.
Rewrite text to sound less formulaic by reusing the source workflow under `claude/humanize`. Use when the user wants writing to sound more natural in Codex.
| name | gh-review-comments |
| description | List, reply to, resolve, unresolve, and create GitHub PR review comment threads using gh CLI scripts. |
Use this skill when the user wants to manage pull request review threads on GitHub (list, reply, resolve, unresolve, or create a review with inline comments).
Extract these values from the user request or current repository context:
owner/repo (required)--author <login>--thread-id <PRRT_...>--reply <message>--resolve--unresolve--create-review--unresolved-onlyIf action details are missing, default to listing threads first and ask a focused follow-up question.
Before any script call:
gh auth status.sandbox_permissions=require_escalated and a short justification.gh auth login, then re-run gh auth status.gh api call fails due sandbox/network restrictions, rerun that command with escalation.Resolve SKILL_DIR to this skill's own directory (the folder that holds scripts/). Do not hardcode another machine's absolute path:
# From a sai checkout the repo-relative path works; otherwise locate the installed
# copy under the Codex plugins cache.
SKILL_DIR="codex/gh-review-comments"
if [ ! -d "$SKILL_DIR/scripts" ]; then
found="$(find "${CODEX_HOME:-$HOME/.codex}/plugins" -type f -name list-threads.sh -path '*gh-review-comments*' 2>/dev/null | head -n1)"
[ -n "$found" ] && SKILL_DIR="$(dirname "$(dirname "$found")")"
fi
Run scripts from that directory so behavior is consistent:
"$SKILL_DIR/scripts/<script>.sh" [args...]
scripts/list-threads.sh"$SKILL_DIR/scripts/list-threads.sh" <owner> <repo> <pr_number> [--author <login>] [--unresolved-only]
Output: one JSON line per thread with thread_id, comment_id, author, body, path, line, is_resolved, is_outdated, reply_count.
scripts/reply-thread.sh"$SKILL_DIR/scripts/reply-thread.sh" <owner> <repo> <pr_number> <comment_id> <body>
comment_id must be the integer top-level comment ID from list-threads.sh.scripts/resolve-thread.sh"$SKILL_DIR/scripts/resolve-thread.sh" <thread_id>
thread_id must be the GraphQL node ID (PRRT_...) from list-threads.sh.scripts/unresolve-thread.sh"$SKILL_DIR/scripts/unresolve-thread.sh" <thread_id>
scripts/create-review.sh"$SKILL_DIR/scripts/create-review.sh" <owner> <repo> <pr_number> <event> <body> [<comments_json>|-]
event: COMMENT, APPROVE, or REQUEST_CHANGEScomments_json: array of objects with path, line, body, optional side (defaults to RIGHT)- to read comments JSON from stdinMap user request to one of:
For reply/resolve operations, enable unresolved filtering unless the user explicitly asks otherwise.
list-threads.sh with required args and any filters.--thread-id is provided, filter to that thread.If no action is requested, stop here.
For each matched thread:
comment_id with reply-thread.shthread_id with resolve-thread.shthread_id with unresolve-thread.shContinue processing remaining threads if one fails; report partial failures clearly.
When the user asks to create a review:
event, review body, and inline comments.create-review.sh exactly once.Do not automatically retry create-review.sh after a successful run because that creates duplicate reviews.
list-threads.sh and compare before/after states.create-review.sh success output as source of truth.Report:
--thread-id matches nothing, report no matching thread.create-review.sh fails, report error and likely cause (for example invalid path/line targets).Read references/gh-api-guide.md before taking action to avoid ID mismatches between REST integer IDs and GraphQL node IDs.
smykla-skalski/sai PR 4."Automaat on smykla-skalski/sai PR 4."Fixed in latest push to unresolved threads by Automaat on PR 4."PRRT_kwDOCnTGG85tgSD3 on smykla-skalski/sai PR 4."Done, thanks! and resolve thread PRRT_kwDOCnTGG85tgSD3 on PR 4."REQUEST_CHANGES review on smykla-skalski/sai PR 4 with inline comments."