一键导入
load-pr-comments
Use to load open/unresolved PR review comments then aggregate them as tasks in .specs/comments/*.md for parallel agents to fix.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use to load open/unresolved PR review comments then aggregate them as tasks in .specs/comments/*.md for parallel agents to fix.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Review your local uncommitted working-tree changes (git diff plus untracked files) and return actionable improvement suggestions. Use before committing, when nothing has been pushed yet.
Review an existing GitHub pull request and post inline review comments on its diff. Use when the changes are on an opened PR rather than your local working tree.
Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed). Use when you want write tests for new logic or increase test coverage.
Run independent tasks concurrently across multiple files or targets using parallel sub-agents, with per-task model selection and LLM-as-a-judge verification. Use when tasks do not depend on each other and can run side by side.
Execute one complex task as ordered, dependent steps run sequentially, passing context from each step to the next, with per-step LLM-as-a-judge verification. Use when later steps depend on the results of earlier ones.
Verify what PR review comments have been addressed (committed/pushed OR uncommitted local changes) and resolve the threads that are genuinely fixed or no longer relevant.
| name | load-pr-comments |
| description | Use to load open/unresolved PR review comments then aggregate them as tasks in .specs/comments/*.md for parallel agents to fix. |
| argument-hint | Optional PR number or URL - defaults to the PR of the current git branch |
Load ONLY open/UNRESOLVED PR review threads and rewrite them into grouped markdown task files under .specs/comments/*.md, each safe for a separate parallel agent to implement with no overlap.
Check if GitHub CLI is installed and authenticated:
gh auth status
Check if the GitHub MCP server is available:
mcp__MCP_DOCKER__pull_request_read
or simular command without MCP_DOCKER prefix, if installed directly.
gh auth login to authenticate.https://github.com/{owner}/{repo}/pull/{n} → number {n}) and do NOT consult the current branch.gh pr view --json number,url,headRefName # current branch's PR
gh repo view --json owner,name.gh pr view errors with "no pull requests found" — STOP and report that no PR is associated with the branch (ask for a PR number/URL).Resolved/unresolved is a GraphQL reviewThreads { isResolved } concept — the REST /pulls/{n}/comments endpoint does NOT expose it. Use one of the two approaches below; if the primary is unavailable, fall back to the other.
Filter isResolved == false directly in the jq:
gh api graphql -f query='
query($owner:String!,$repo:String!,$pr:Int!){
repository(owner:$owner,name:$repo){
pullRequest(number:$pr){
reviewThreads(first:100){
nodes {
isResolved
isOutdated
path
line
startLine
originalLine
comments(first:50){
nodes { author{login} body diffHunk url }
}
}
}
}
}
}' -F owner=OWNER -F repo=REPO -F pr=PR_NUMBER \
--jq '[.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved==false)
| {path, isOutdated,
line: (.line // .startLine // .originalLine),
comments: [.comments.nodes[]
| {author: .author.login, url, body, diffHunk}]}]'
This returns each unresolved thread with its file path, an isOutdated flag, a usable line, and ordered comments (author, body, permalink url, diffHunk).
IMPORTANT: For OUTDATED threads line is null (the diff moved). The jq above already falls back line // startLine // originalLine, so line is never null when any anchor exists. When ALL three are null, omit the :<line> segment entirely in the template — never render path:null.
If the GitHub MCP server (MCP_DOCKER) is available, use the mcp__MCP_DOCKER__pull_request_read tool with method: "get_review_comments":
mcp__MCP_DOCKER__pull_request_read
method: "get_review_comments"
owner: "OWNER"
repo: "REPO"
pullNumber: PR_NUMBER
perPage: 100
It returns review_threads[], each with is_resolved, is_outdated, is_collapsed (all snake_case — verified against this tool's response) and comments[] (body, path, author, html_url). Keep only threads where is_resolved is false. Note the MCP comment objects expose path but NOT a line number, so use the html_url as the location anchor. Paginate with after: <endCursor> while pageInfo.hasNextPage is true.
Convert unresolved threads into focused task files for parallel agents.
Deduplicate FIRST (before grouping): if two or more threads request the same change at the same path (and same/overlapping line), or carry an identical suggested fix, collapse them into ONE requirement. Do not emit a separate line item per duplicate thread — this matters most in the nitpick file where repeated trivial suggestions cluster.
Rewrite rules per thread:
url/html_url, plus path:line) when available. If line is null (outdated/unanchorable thread), write just path with no :line segment and note it is outdated.Before/after (lock in "rewrite as task, do not summarize"):
/add-task /plan-task /implement-task"/add-task, /plan-task, /implement-task" (suggestion preserved verbatim, conversation framing dropped — NOT "fix the commands").Grouping rules:
nitpicks.md).Ensure generated comment files are ignored. This is idempotent: it appends the entry only if missing, and >> CREATES .gitignore if it does not exist.
grep -qF '.specs/comments/*.md' .gitignore 2>/dev/null || printf '\n.specs/comments/*.md\n' >> .gitignore
mkdir -p .specs/comments
Write each group as .specs/comments/<kebab-topic>.md using this template:
# Tasks: <focused topic, e.g. Fix incorrect command names in README-zh>
## <Topic 1>
File: `<path>:<line>` (omit `:<line>` when line is null; append " (outdated)" if isOutdated)
<Issue description for the change>
### Requirements
- [ ] <Reviewer requirement or bot fix suggestion, substance preserved>
- [ ] <Next requirement in this topic>
## <Topic 2>
File: `<path>:<line>`
<Issue description for the change>
### Requirements
- [ ] <Reviewer requirement or bot fix suggestion, substance preserved>
- [ ] <Next requirement in this topic>
Summarize: target PR (number + url), count of unresolved threads loaded, files created with their topics, and any threads skipped (resolved) or limitations hit (e.g. MCP unavailable).
| Situation | Handling |
|---|---|
| No PR for current branch | gh pr view errors → report and request a PR number/URL |
| Argument is a URL | Extract trailing number after /pull/ |
| Zero unresolved threads | Create no files; report "no unresolved comments" |
| >100 threads | Paginate (GraphQL after cursor / MCP after) |
| MCP unavailable | Use gh GraphQL; if both unavailable, report limitation |
| Only resolved threads exist | Skip all; report none actionable |