Review respond

From bellini666/dotfiles · View interactive version

Review respond is an AI agent skill from the GitHub repository bellini666/dotfiles. This skill should be used when the user asks to 'address review comments', 'respond to review', 'reply to reviews', 'fix review feedback', 'handle PR feedback', 'address code review', 'review suggestions', 'mark as fixed', 'resolve review comments', 'reply to copilot', 'reply to sourcery', or needs

How to use this skill

Skill file

Review Response

Workflow

  1. Fetch review threads via GraphQL (see GitHub API Reference below)
  2. Fetch full comment bodies for each top-level thread comment
  3. Triage comments into categories:
  1. Apply minimum changes — address exactly what each comment asks
  2. Run the touched modules' tests + type checker. CI runs the full suite
  3. Reply to each thread and resolve after addressing

GitHub API Reference

Fetch review threads (top-level comments with thread IDs)

gh api graphql -f query='
  query {
    repository(owner: "OWNER", name: "REPO") {
      pullRequest(number: PR_NUMBER) {
        reviewThreads(first: 50) {
          nodes {
            id
            isResolved
            comments(first: 1) {
              nodes {
                databaseId
                author { login }
                body
              }
            }
          }
        }
      }
    }
  }
'

Fetch inline review comments (REST, for path/line context)

gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments \
  --jq '.[] | select(.in_reply_to_id == null) | {id: .id, user: .user.login, path: .path, line: (.line // .original_line), body: .body}'

Reply to a review thread

gh api graphql -f query='
  mutation {
    addPullRequestReviewThreadReply(input: {
      pullRequestReviewThreadId: "THREAD_ID",
      body: "Reply message here."
    }) {
      comment { id }
    }
  }
'

Resolve a review thread

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

Handling Bot Reviews (Copilot, Sourcery, CodeRabbit)

Automated review tools tend to flag style, pattern, and convention suggestions rather than logic bugs. Batch-address their comments: apply the ones that align with the project's existing style, and dismiss the rest with a brief rationale (e.g., "Intentional, matches the existing pattern in this module"). Do not blindly apply every bot suggestion; evaluate each against the codebase's actual conventions.

GitLab Equivalent

Use glab CLI for GitLab MRs:

glab mr view <MR_NUMBER>                          # View MR details and comments
glab mr note <MR_NUMBER> -m "Reply message"       # Add a comment/reply
glab mr update <MR_NUMBER> --ready                 # Mark MR as ready
glab api projects/:id/merge_requests/:iid/notes    # List all MR notes via API

For thread-level replies on GitLab, use the API to reply to a specific discussion:

glab api projects/:id/merge_requests/:iid/discussions/:discussion_id/notes \
  -X POST -f body="Reply message"

Scope Rules

Anti-Patterns

Stop immediately if about to:

Reply Style

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.