Skip to content
handling-review-comments logo

Handling Review Comments

handling-review-comments

Handles GitHub pull request review comments. Use when asked to fix review comments, address PR feedback, or resolve review threads. Fetches comments via GitHub CLI, fixes issues in code, replies to reviewers, and resolves threads.

SKILL.md

Full skill instructions

Handling Review Comments

Process for addressing GitHub PR review comments efficiently using GitHub CLI.

Prerequisites

  • GitHub CLI installed and authenticated: gh auth status
  • Repository cloned locally with push access

Workflow

  1. Fetch comments - Get all review comments from the PR
  2. Fix issues - Implement fixes for each comment
  3. Run checks - Verify fixes pass tests and linting
  4. Commit and push - Group related fixes logically
  5. Reply to comments - Confirm fixes with commit references
  6. Resolve threads - Mark resolved via GraphQL API

Fetching Comments

Get All PR Comments

gh api repos/​{owner}/​{repo}/​pulls/​{pr_number}/​comments

# Example
gh api repos/​sergiodk5/​anime-list/​pulls/​9/​comments

Get Review Threads (with resolution status)

gh api graphql -f query='{
  repository(owner: "{owner}", name: "{repo}") {
    pullRequest(number: {pr_number}) {
      reviewThreads(first: 20) {
        nodes {
          id
          isResolved
          comments(first: 1) {
            nodes {
              body
              databaseId
            }
          }
        }
      }
    }
  }
}'

Replying to Comments

gh api repos/​{owner}/​{repo}/​pulls/​{pr_number}/​comments/​{comment_id}/​replies \
  -X POST \
  -f body="Fixed in commit {hash}. {description of fix}"

# Example
gh api repos/​sergiodk5/​anime-list/​pulls/​9/​comments/​123456/​replies \
  -X POST \
  -f body="Fixed in commit abc123. Added validation as suggested."

Resolving Threads

Single Thread

gh api graphql -f query='
mutation {
  resolveReviewThread(input: {threadId: "THREAD_ID_HERE"}) {
    thread { isResolved }
  }
}'

Multiple Threads

for thread_id in PRRT_abc123 PRRT_def456 PRRT_ghi789; do
  gh api graphql -f query="mutation { resolveReviewThread(input: {threadId: \"$thread_id\"}) { thread { isResolved } } }"
done

Comment Categories

TypeAction
Bug/​SecurityFix immediately, add tests if needed
NitpickFix if reasonable, explain if not
EnhancementAcknowledge, create follow-up issue if needed
QuestionAnswer clearly, add code comments if helpful

Before Pushing

npm run format && npm run lint && npm run test:unit

Commit Message Format

Group related fixes in logical commits:

git commit -m "fix: address security review feedback

- Add input validation for user-provided colors
- Escape HTML in dynamic attributes
- Use separate timeout variables to prevent race conditions"

Response Patterns

For fixes:

Fixed in commit abc123. Added validation as suggested.

For acknowledged issues:

Acknowledged. This will be addressed in a follow-up PR.

For clarifications:

This is intentional because [reason]. Happy to discuss further.

For questions:

Good question! This works by [explanation]. Added a code comment for clarity.

Verify Resolution

gh api graphql -f query='{
  repository(owner: "{owner}", name: "{repo}") {
    pullRequest(number: {pr_number}) {
      reviewThreads(first: 20) {
        nodes { isResolved }
      }
    }
  }
}'

Complete Workflow Example

# 1. Fetch comments
gh api repos/​sergiodk5/​anime-list/​pulls/​9/​comments

# 2. Fix issues in code (manual step)

# 3. Run checks
npm run format && npm run lint && npm run test:unit

# 4. Commit and push
git add . && git commit -m "fix: address review feedback" && git push

# 5. Reply to each comment
gh api repos/​sergiodk5/​anime-list/​pulls/​9/​comments/​{id}/​replies \
  -X POST \
  -f body="Fixed in commit abc123..."

# 6. Resolve threads
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "..."}) { thread { isResolved } } }'

Best Practices

  1. Fix Before Responding - Implement fix before replying to ensure accuracy
  2. Reference Commits - Include commit hashes so reviewers can verify
  3. Group Related Fixes - Combine related changes in logical commits
  4. Run All Checks - Ensure tests/​lint pass before pushing
  5. Be Concise - Keep replies brief but informative

More Security skills

supabase logo
Security

supabase

Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...

2.7K 308.9K
View

Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.

98 216.2K
View

Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.

462 163.8K
View

A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.

462 127.7K
View

Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.

462 125.1K
View

Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.

222 118.2K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View
cloudflare logo
Security

cloudflare

Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.

3K 110.7K
View

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

253 103K
View
gws-gmail logo
Security

gws-gmail

Send, read, and manage Gmail messages, drafts, labels, and account settings.

31.2K 78.9K
View

Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.

94 72.3K
View
gws-shared logo
Security

gws-shared

Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.

31.2K 63.4K
View

Security AI tools

StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
GeoSpy logo
Security

GeoSpy

GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams

Free
View

Detect AI-generated voices to protect against audio fraud.

Paid
View

Ensure Your Content's Originality with AI Plagiarism Checker

Freemium
View
Img Upscaler logo
Security

Img Upscaler

Upscale images by 400% without quality loss

Freemium
View
AICheatCheck logo
Security

AICheatCheck

Accurately Detect AI-Generated Content with TheChecker.AI

Free
View
D
Security

Detect GPT

Chrome extension that detects and flags AI-generated content

Free
View