
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.
- Installs
- 539
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/neolabhq/context-engineering-kit --skill load-pr-comments- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads load-pr-comments automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Load Unresolved PR Review Comments as Parallel Tasks
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.
Critical Guidelines
- You MUST load ONLY threads where the resolved state is false. Skip resolved threads.
- You MUST rewrite each comment as an actionable TASK requirement, not a summary. Preserve substance (code suggestions, exact instructions) verbatim.
- You MUST NOT post, reply to, or modify anything on GitHub. This skill is read-only against the API.
- You MUST group comments so each file is independently implementable with NO duplication across files.
Step 0: Verify what tools are available
-
Check if GitHub CLI is installed and authenticated:
gh auth status -
Check if the GitHub MCP server is available:
mcp__MCP_DOCKER__pull_request_reador simular command without
MCP_DOCKERprefix, if installed directly.
- if both are available, use any that have enough accesses to the repository.
- if github mcp server avaiable but have different structure, adjust in order to fit the expected structure.
- if none is available, try to load directly through curl in case if it is public repository. If it is private, ask user to install GitHub CLI or GitHub MCP server.
- if MCP server not installed, but github cli is installed, but not authenticated, ask user to run
gh auth loginto authenticate.
Step 1: Resolve the Target PR
- An explicit PR argument ALWAYS takes precedence over current-branch resolution. If a PR number or URL was passed, use it (a URL like
https://github.com/{owner}/{repo}/pull/{n}→ number{n}) and do NOT consult the current branch. - Otherwise default to the PR of the CURRENT branch:
gh pr view --json number,url,headRefName # current branch's PR
- Resolve repo owner/name:
gh repo view --json owner,name. - If no PR exists for the branch,
gh pr viewerrors with "no pull requests found" — STOP and report that no PR is associated with the branch (ask for a PR number/URL).
Step 2: Retrieve UNRESOLVED Comments
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.
Primary: gh CLI (GraphQL)
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.
Fallback: GitHub MCP
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.
Step 3: Group and Rewrite as Tasks
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:
- Drop conversation framing and author names. Output a task, not a transcript.
- If a HUMAN reviewer left feedback, write THAT as the requirement.
- If only a bot/AI suggestion exists (Claude, CodeRabbit, Copilot, etc.), write that fix suggestion as the requirement.
- Preserve substance — do NOT summarize away code blocks, suggested diffs, or exact wording.
- Add context: a short issue description and a link to the file/line (the comment
url/html_url, pluspath:line) when available. Iflineis null (outdated/unanchorable thread), write justpathwith no:linesegment and note it is outdated.
Before/after (lock in "rewrite as task, do not summarize"):
- Raw thread (bot): "commands is incorrect, real commands is more like
/add-task /plan-task /implement-task" - Task requirement: "- [ ] Replace the listed commands with the correct ones:
/add-task,/plan-task,/implement-task" (suggestion preserved verbatim, conversation framing dropped — NOT "fix the commands").
Grouping rules:
- Group by file or by functionality so two agents never touch the same area → NO conflicts, NO duplicated work.
- Do NOT duplicate a comment across files.
- Aggregate nitpicks / trivial one-line changes into ONE combined file (e.g.
nitpicks.md). - Cap at ≤5 files total. Do NOT over-combine unrelated changes — each file must be a single, focused, independently-implementable unit of work.
Step 4: .gitignore Handling
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
Step 5: Write Files
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>
Step 6: Report
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).
Edge Cases
| 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 |
FAQ
What does the load-pr-comments skill do?
Use to load open/unresolved PR review comments then aggregate them as tasks in .specs/comments/.md for parallel agents to fix.
How do I install load-pr-comments?
Run npx skills add https://github.com/neolabhq/context-engineering-kit --skill load-pr-comments in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/load-pr-comments/ (personal) or .claude/skills/load-pr-comments/ (project).
Which AI agents can use load-pr-comments?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is load-pr-comments safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains load-pr-comments?
It is published by neolabhq in neolabhq/context-engineering-kit. It has 539 recorded installs.
More from neolabhq/context-engineering-kit
prompt-engineering
neolabhq/context-engineering-kit
Use this skill when you writing commands, hooks, skills for Agent, or prompts for sub agents or any other LLM interaction, including optimizing prompts, improving LLM outputs, or designing production prompt templates.
thought-based-reasoning
neolabhq/context-engineering-kit
Use when tackling complex reasoning tasks requiring step-by-step logic, multi-step arithmetic, commonsense reasoning, symbolic manipulation, or problems where simple prompting fails - provides comprehensive guide to Chain-of-Thought and related prompting techniques (Zero-shot CoT, Self-Consistency, Tree of Thoughts, Least-to-Most, ReAct, PAL, Reflexion) with templates, decision matrices, and research-backed patterns
context-engineering
neolabhq/context-engineering-kit
Understand the components, mechanics, and constraints of context in agent systems. Use when writing, editing, or optimizing commands, skills, or sub-agents prompts.
reflect
neolabhq/context-engineering-kit
Reflect on previus response and output, based on Self-refinement framework for iterative improvement with complexity triage and verification
write-concisely
neolabhq/context-engineering-kit
Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.
kaizen
neolabhq/context-engineering-kit
Use when Code implementation and refactoring, architecturing or designing systems, process and workflow improvements, error handling and validation. Provide tehniquest to avoid over-engineering and apply iterative improvements.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.