github-pr-review
GitHub PR review operations using gh CLI and gh api.
Skill by agent-rails
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/agent-rails-github-pr-review
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/github-pr-review
What's inside
- Skill name
github-pr-review- Description
- GitHub PR review operations using gh CLI and gh api. Use when replying to inline comments, creating reviews, resolving threads, or managing PR conversations. Trigger phrases include "reply to comment", "pr review", "inline comment", "resolve thread", "react to comment".
- License
- Apache-2.0
- Instructions
- 161 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# GitHub PR Review Operations
Use `gh` CLI and `gh api` for PR review operations. These patterns work reliably for managing PR conversations.
## Get repo owner/name
Before using `gh api` with `{owner}/{repo}`, get the correct values:
```bash
# From git remote (recommended)
git remote get-url origin | sed -E 's/.*[:/]([^/]+)\/([^.]+)(\.git)?$/\1\/\2/'
# Or use gh to get repo info
gh repo view --json nameWithOwner -q .nameWithOwner
```
Common mistake: Using wrong org name (e.g., `anomalyco` vs `your-org`) causes 404 errors.
## Get PR inline review comments
```bash
# List all inline review comments on a PR
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments | jq -r '.[] | "\(.id)|\(.path)|\(.user.login)|\(.body)"'
# Get comment IDs with file context
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments | jq -r '.[] | "---\n**\(.user.login)** on `\(.path)` (line \(.line // .original_line)):\n\(.body)\n"'
```
## Reply to inline review comments
```bash
# Reply to a specific inline comment (use in_reply_to_id)
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/replies \
-X POST \
-f body="Your reply message here"
```
Important: Use the `/replies` endpoint, not creating a new comment. The comment_id is the `id` field from the comment you're replying to.
## Create a new inline comment
Warning: The single-comment endpoint is finicky. Prefer the batch review method below.
```bash
# Single comment (often fails with validation errors)
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
-X POST \
-f body="Your comment" \
-f commit_id="abc123" \
-f path="path/to/file.ts" \
-F line=42 \
-f side="RIGHT"
```
### Recommended: Batch inline comments via reviews API
This method is more reliable. Use `position` (line in diff), not `line` (line in file).
```bash
COMMIT_ID=$(gh pr view {pr_number} --json headRefOid -q .headRefOid)
gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews -X POST --input - << EOF
{
"commit_id": "$COMMIT_ID",
"event": "COMMENT",
"comments": [
{"path": "src/file.ts", "position": 10, "body": "First comment"},
{"path": "src/file.ts", "position": 25, "body": "Second comment"}
]
}
EOF
```
Understanding `position` vs `line`:
- `position`: Line number in the diff output (count from `@@` hunk header, 1-indexed)
- `line`: Line number in the file (only works with `subject_type=line` which has other requirements)
To find position: Run `gh pr diff {pr}` and count lines from the `@@` marker.
## Get PR general comments (not inline)
```bash
# These are issue-style comments, not code review comments
gh pr view {pr_number} --comments --json comments | jq -r '.comments[] | "---\n**\(.author.login)** (\(.createdAt)):\n\(.body)\n"'
```
## Add a general PR comment
```bash
gh pr comment {pr_number} --body "Your comment here"
```
## Create a PR review
```bash
# Approve
gh pr review {pr_number} --approve --body "LGTM!"
# Request changes
gh pr review {pr_number} --request-changes --body "Please fix X"
# Just comment (no approval/rejection)
gh pr review {pr_number} --comment --body "Some thoughts..."
```
## React to a comment
```bash
gh api repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions \
-X POST \
-f content="+1" # or: -1, laugh, confused, heart, hooray, rocket, eyes
```
## Resolve/unresolve a review thread
```bash
# Get the thread ID first
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {From agent-rails/agentic-fabric, Apache-2.0.
More from agent-rails/agentic-fabric
- 0.529score
pr-sizer
agent-rails
Classify a pull request against the PR size rubric and, for too-large PRs, spawn a sub-agent to propose concrete split plans.
SkillBFreshness: BClaude Code +9 - 0.524score
draft-pr-fixes
agent-rails
Draft cross-vendor patches addressing findings from a prior PR review.
SkillBFreshness: BClaude Code +9 - 0.524score
daily-report
agent-rails
Generate end-of-day report from GitHub, Slack, and K8s activity.
SkillBFreshness: BClaude Code +9 - 0.524score
review-pr
agent-rails
Review a GitHub PR using the your-pr-reviewer agent with wiki-backed institutional knowledge.
SkillBFreshness: BClaude Code +9 - 0.521score
security-signal-amplifier
agent-rails
Amplify external AI/MCP security advisories into the right channels for your org — summarize the advisory, cross-post to
SkillBFreshness: BClaude Code +9 - 0.479score
self-review
agent-rails
Multi-lens local self-review of a branch (pre-PR) or any remote PR.
SkillCFreshness: CClaude Code +9 - 0.474score
proactive-delegation
agent-rails
Patterns for delegating independent subtasks to subagents when planning multi-part tasks.
SkillCFreshness: CClaude Code +9 - 0.474score
standup
agent-rails
Generate daily standup summaries for Slack from git commits and GitHub activity.
SkillCFreshness: CClaude Code +9 - 0.474score
ci-investigation
agent-rails
Investigate CI/CD failures on PRs using subagents for parallel log analysis.
SkillCFreshness: CClaude Code +9 - 0.474score
first-principles
agent-rails
Run a first-principles derivation pass before adopting a framework, tool, pattern, or template.
SkillCFreshness: CClaude Code +9 - 0.474score
github-cli
agent-rails
GitHub CLI (gh) and API operations for branches, PRs, issues, releases, workflows, and GraphQL queries.
SkillCFreshness: CClaude Code +9 - 0.474score
memory-lint
agent-rails
Health-check the auto-memory dir (MEMORY.md + topic files).
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 17, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/agent-rails/agentic-fabric
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from agent-rails
- 0.529score
pr-sizer
agent-rails
Classify a pull request against the PR size rubric and, for too-large PRs, spawn a sub-agent to propose concrete split plans.
SkillBFreshness: BClaude Code +9 - 0.524score
daily-report
agent-rails
Generate end-of-day report from GitHub, Slack, and K8s activity.
SkillBFreshness: BClaude Code +9 - 0.524score
draft-pr-fixes
agent-rails
Draft cross-vendor patches addressing findings from a prior PR review.
SkillBFreshness: BClaude Code +9 - 0.524score
review-pr
agent-rails
Review a GitHub PR using the your-pr-reviewer agent with wiki-backed institutional knowledge.
SkillBFreshness: BClaude Code +9 - 0.521score
security-signal-amplifier
agent-rails
Amplify external AI/MCP security advisories into the right channels for your org — summarize the advisory, cross-post to
SkillBFreshness: BClaude Code +9 - 0.479score
self-review
agent-rails
Multi-lens local self-review of a branch (pre-PR) or any remote PR.
SkillCFreshness: CClaude Code +9
Cite this page
github-pr-review skill. Agent Mart. https://agentmart.dev/skills/agent-rails-github-pr-review (last updated 2026-10-24)