Review pr

From hmislk/hmis · View interactive version

Review pr is an AI agent skill from the GitHub repository hmislk/hmis. Investigate and resolve GitHub pull request review comments for HMIS. Use when the user wants Codex to read PR review threads, assess CodeRabbit or Codex feedback, discuss valid fixes, batch and apply changes, reply to each comment, and re-request review.

How to use this skill

Skill file

Review PR

Overview

Use this skill when working a PR review loop on HMIS: collect review comments, verify them against the codebase, discuss unclear items with the user, apply confirmed fixes, and close the loop on GitHub.

Workflow

  1. Fetch the branch and inspect the PR comments.
  1. Group comments by file and behavior.
  1. Discuss before changing anything ambiguous.
  1. Apply confirmed fixes in a tight batch.
  1. Check the repository-specific hazards before pushing.
  1. Push, reply, and re-request review — by the cardinal rules below.

Cardinal Rules for Posting on a PR

  1. Do NOT create new top-level inline comments on the PR. Each one becomes a thread the author must manually resolve. Self-review noise is the most common offender.
  2. Reply only after fixing (or explicitly dismissing). Bots cannot fix anything — describe action taken, not requested.
  1. Replies go UNDER existing reviewer threads only — use POST /pulls/{pr}/comments/{id}/replies. Never as new top-level comments.
  2. Self-review items go in the commit message (or PR description if deferred). Never as new inline comments. Reference file:line in the commit message so reviewers can find the change in the diff.
  3. ONE re-review request at the end — click "Re-request review" once after all fixes are pushed and all existing threads have replies. Not per item.

Order: discuss → fix → push → reply to existing threads → one re-review request.

Endpoint Cheat Sheet

| Want | Endpoint | Use? |

|---|---|---|

| Reply under existing reviewer comment | POST /pulls/{pr}/comments/{id}/replies | YES |

| New standalone inline comment | POST /pulls/{pr}/comments | NO — creates a fresh thread |

| Bundled review wrapper | POST /pulls/{pr}/reviews | NO |

| General PR comment | POST /issues/{n}/comments | Sparingly, only for actual PR-wide notes |

# List existing comments to find a parent ID
gh api "repos/hmislk/hmis/pulls/<PR>/comments" \
  --jq '.[] | "\(.id) \(.user.login) \(.path):\(.line // .original_line)"'

# Post a threaded reply (the only legitimate reply form)
gh api -X POST "repos/hmislk/hmis/pulls/<PR>/comments/<COMMENT_ID>/replies" \
  -f body="Fixed in <commit-sha>: <what was changed>."

Common Review Patterns

Reference

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.