
Github Pr Comments
- 4 installs
- 7.5k repo stars
- Updated August 5, 2026
- antinomyhq/forge
github-pr-comments is a Claude Code skill that resolves inline code review comments on a GitHub pull request by fetching each comment with its diff context and applying the change.
About
This skill resolves inline code review comments on a GitHub pull request. A developer runs it after a reviewer leaves feedback, and it fetches every inline comment with its surrounding diff hunk, creates a todo per comment, then applies each change. It applies GitHub suggestion blocks verbatim and infers the required change for free-form feedback, then runs cargo check and cargo nextest to verify.
- Fetches every inline PR comment with its diff hunk via a bundled script
- Creates one todo per comment so nothing is missed across many files
- Applies suggestion blocks verbatim and infers changes for free-form feedback, then verifies with cargo check and nextest
Github Pr Comments by the numbers
- 4 all-time installs (skills.sh)
- Ranked #901 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
github-pr-comments capabilities & compatibility
- Capabilities
- code review · pr description
- Works with
- github
- Use cases
- code review
What github-pr-comments says it does
Resolve inline code review comments on a GitHub PR.
Add one todo for each comment before touching any code. This ensures nothing is missed even when comments span many files.
npx skills add https://github.com/antinomyhq/forge --skill github-pr-commentsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 4 |
|---|---|
| repo stars | ★ 7.5k |
| Last updated | August 5, 2026 |
| Repository | antinomyhq/forge ↗ |
What it does
Systematically apply reviewer feedback on an open GitHub pull request without missing any inline comment.
Who is it for?
Working through reviewer feedback on an open GitHub PR systematically
When should I use this skill?
Asked to resolve review comments, address PR feedback, or fix PR comments
What you get
Every inline review comment is addressed and the change set is verified to compile and pass tests.
- Applied code changes addressing each PR comment
- Verified build via cargo check and cargo nextest run
By the numbers
- one todo item created per review comment
Files
Resolve Code Review Comments
1. Fetch all comments
Run the bundled script to get every inline comment with its diff hunk:
bash .forge/skills/resolve-code/scripts/pr-comments.sh [PR_NUMBER]Omit PR_NUMBER to use the current branch's PR.
Each block in the output contains:
File :— file path and line number-- code context --— the diff hunk showing surrounding lines-- comment --— the reviewer's message
2. Create a todo item per comment
Add one todo for each comment before touching any code. This ensures nothing is missed even when comments span many files.
3. Apply each comment
Work through todos one at a time. There are two comment types:
Suggestion block
Body starts with `suggestion . Apply the suggested text verbatim as a replacement for the highlighted lines in the diff hunk.
Free-form feedback
Read the comment in the context of the diff hunk, infer the required change, and implement it. When the intent is ambiguous, make the change that best matches the project's conventions and state the assumption clearly.
4. Verify
After all comments are addressed, run:
cargo check && cargo nextest runFix any errors before marking the task complete.
#!/bin/bash
# Extract active (non-resolved, non-outdated) review comment threads from a PR,
# each paired with its surrounding code context (diff hunk).
#
# Usage:
# ./scripts/pr-comments.sh [PR_NUMBER]
#
# If PR_NUMBER is omitted, the script resolves the PR for the current branch.
set -euo pipefail
# ---------------------------------------------------------------------------
# Resolve PR number
# ---------------------------------------------------------------------------
if [[ $# -ge 1 ]]; then
PR_NUMBER="$1"
else
PR_NUMBER=$(gh pr view --json number -q '.number' 2>/dev/null) || {
echo "error: not on a branch with an open PR — provide a PR number as the first argument." >&2
exit 1
}
fi
# ---------------------------------------------------------------------------
# Resolve repository owner and name for GraphQL variables.
# ---------------------------------------------------------------------------
OWNER=$(gh repo view --json owner -q '.owner.login')
REPO=$(gh repo view --json name -q '.name')
# ---------------------------------------------------------------------------
# Fetch review threads via GraphQL.
# The REST comments endpoint does not expose resolution or outdated status.
# GraphQL provides isResolved and isOutdated per thread, which lets us skip
# threads that no longer need action.
# --paginate follows endCursor automatically; jq -s merges all pages.
# gh colorizes output even when piped, so strip ANSI escape codes first.
# ---------------------------------------------------------------------------
STRIP_ANSI=$'s/\033\\[[0-9;]*[mGKH]//g'
THREADS_JSON=$(gh api graphql \
-f query='
query($owner: String!, $repo: String!, $pr: Int!, $endCursor: String) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100, after: $endCursor) {
pageInfo { hasNextPage endCursor }
nodes {
isResolved
isOutdated
comments(first: 50) {
nodes {
path
line
body
author { login }
createdAt
diffHunk
}
}
}
}
}
}
}
' \
-f owner="$OWNER" \
-f repo="$REPO" \
-F pr="$PR_NUMBER" \
--paginate \
| sed "$STRIP_ANSI" \
| jq -s '[.[].data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false and .isOutdated == false)]')
TOTAL=$(echo "$THREADS_JSON" | jq 'length')
if [[ "$TOTAL" -eq 0 ]]; then
echo "No active review comments found for PR #${PR_NUMBER}."
exit 0
fi
echo "PR #${PR_NUMBER} — ${TOTAL} active review thread(s)"
echo ""
# ---------------------------------------------------------------------------
# Format and print each active thread in a single jq pass.
# The first comment in the thread carries the diff hunk (code context).
# All comments in the thread are shown so the full conversation is visible.
# ---------------------------------------------------------------------------
SEP="$(printf '%0.s─' {1..80})"
echo "$THREADS_JSON" | jq -r --arg sep "$SEP" '
.[] |
(.comments.nodes[0]) as $first |
[
$sep,
("File : " + $first.path + ":" + (($first.line // "?") | tostring)),
("Author : @" + $first.author.login),
("Date : " + $first.createdAt),
"",
"-- code context --",
$first.diffHunk,
"",
"-- comment --",
(.comments.nodes | map(.body) | join("\n\n---\n\n")),
""
] | join("\n")
'
Related skills
FAQ
How does it find the review comments?
It runs a bundled script (pr-comments.sh) that outputs every inline comment with its file path, line number, and diff hunk.
How does it handle GitHub suggestion blocks versus free-form comments?
Suggestion blocks are applied verbatim as a replacement for the highlighted lines; free-form feedback is read in context and implemented.