Agent skill
fetch-pr-comments
Fetch and summarize unresolved GitHub PR review comments without making changes. Use when the user asks to "fetch PR comments", "show PR comments", "check PR for unresolved comments", "list review comments", "what comments are on the PR", "show unresolved threads", or "summarize PR feedback".
Install this agent skill to your Project
npx add-skill https://github.com/tobihagemann/turbo/tree/main/skills/fetch-pr-comments
SKILL.md
Fetch PR Comments
Fetch unresolved review comments and top-level review body comments from a GitHub PR and present them in a readable summary. This is a read-only skill -- it does not evaluate, fix, or reply to any comments.
Step 1: Fetch Comments
Fetch review threads and top-level review body comments from the PR:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
title url
reviewThreads(first: 100) {
nodes {
id isResolved isOutdated
comments(first: 50) {
nodes { author { login } body path line originalLine diffHunk }
}
}
}
reviews(first: 50) {
nodes {
author { login }
body state
}
}
}
}
}' -f owner='{owner}' -f repo='{repo}' -F pr={pr_number}
Auto-detect owner, repo, and PR number from current branch if not provided. Filter review threads to unresolved only. Filter reviews to those with a non-empty body, excluding PENDING state (unsubmitted drafts).
Step 2: Present Results
Display a summary header followed by comments grouped by file.
Summary header:
- PR title and link
- Branch:
head->base - Total threads / unresolved threads
Top-level review comments (if any):
Show reviews with non-empty body before the file-grouped threads:
## Review Comments
### @reviewer (CHANGES_REQUESTED)
> Review body text here
### @another-reviewer (COMMENTED)
> Another review body here
Inline threads grouped by file:
For each file with unresolved threads, show:
## `path/to/file.ts`
### Line 42 (by @reviewer)
```diff
<diffHunk from first comment>
```
> Comment body here
### Line 10 (by @another-reviewer) [outdated]
```diff
<diffHunk from first comment>
```
> First comment body
>
> **@reply-author:** Reply body
Formatting rules:
- Show top-level review body comments first, grouped under "Review Comments"
- Then group threads by file path, in the order they appear
- Within each file, order threads by line number
- Show the
diffHunkfrom the first comment in each thread as a fenced diff code block before the comment body. This is the code context the reviewer was looking at. - For the line number, use
lineif available. Fall back tooriginalLinefor outdated comments wherelineis null. - Show all comments in a thread (the first is the original review comment; subsequent ones are replies)
- Mark outdated threads with
[outdated] - Use blockquotes for comment bodies
- For threads with multiple comments, show each comment with its author
- If there are zero unresolved threads and zero review body comments, say so and stop
Check your task list for remaining tasks and proceed.
Rules
- If the user wants to fix or reply to comments, direct them to use
/resolve-pr-comments.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
review-api-usage
Check API, library, and framework usage in code against official documentation and installed skill knowledge. Flags deprecated APIs, incorrect method signatures, wrong parameter types, version-incompatible patterns, and best-practice violations. Use when the user asks to "review API usage", "check API usage", "verify against docs", "check library usage", "validate API calls", "check against documentation", or "check for deprecated APIs".
resolve-pr-comments
Evaluate, fix, answer, and reply to GitHub pull request review comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR feedback", "handle review comments", "address review feedback", "respond to PR comments", "answer review questions", or "address code review".
consult-codex
Multi-turn consultation with Codex CLI for second opinions, brainstorming, or collaborative problem-solving. Use when the user asks to "consult codex", "ask codex", "get codex's opinion", "brainstorm with codex", "discuss with codex", or "chat with codex".
review-tooling
Detect what dev tooling infrastructure a project has and flag gaps across linters, formatters, pre-commit hooks, test runners, and CI/CD pipelines. Returns structured findings without applying changes. Use when the user asks to "review tooling", "check project tooling", "what tooling is missing", "review dev infrastructure", or "tooling audit".
create-changelog
Create a CHANGELOG.md following keepachangelog.com conventions with version history backfilled from GitHub releases or git tags. Use when the user asks to "create a changelog", "add a changelog", "initialize changelog", "start a changelog", "set up changelog", "generate changelog", or "backfill changelog".
update-changelog
Update the Unreleased section of CHANGELOG.md based on current changes. No-op if CHANGELOG.md does not exist. Use when the user asks to "update changelog", "add to changelog", "update the changelog", "changelog entry", "add changelog entry", or "log this change".
Didn't find tool you were looking for?