# Gh Pr Reviewer

> Fetch GitHub Pull Request diffs, metadata, and CI status using the gh CLI. Summarise changes, check review status, and post structured review comments.

- Skill: `loonghao/gh-pr-reviewer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add loonghao/gh-pr-reviewer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/loonghao/gh-pr-reviewer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- License: MIT
- Author: loonghao (https://skillmd.com/u/loonghao)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/loonghao/gh-pr-reviewer

---


# GitHub PR Reviewer

Interact with GitHub Pull Requests via the [GitHub CLI (`gh`)](https://cli.github.com).

## When to use

- Reviewing a PR diff before merging
- Checking CI check status for a PR
- Posting structured review comments from an AI review pipeline
- Listing open PRs filtered by author, label, or reviewer

## Inputs

```json
{
  "repo": "loonghao/agentverse",
  "pr_number": 12,
  "action": "review",
  "comment": "LGTM — all checks pass."
}
```

| Field       | Required | Description                                              |
|-------------|----------|----------------------------------------------------------|
| `repo`      | ✓        | `owner/repo` slug                                        |
| `pr_number` | ✓        | Pull request number                                      |
| `action`    | ✓        | `diff` / `status` / `review` / `list`                   |
| `comment`   | ✗        | Review comment body (used when `action = "review"`)      |

## Example commands

```bash
# Fetch the diff for PR #12
gh pr diff 12 --repo loonghao/agentverse

# Check CI status
gh pr checks 12 --repo loonghao/agentverse

# Post a review comment
gh pr review 12 --approve --body "LGTM"

# List open PRs assigned to me
gh pr list --assignee @me --state open
```

## Output (action=status)

```json
{
  "pr": {
    "number": 12,
    "title": "feat: skills management system",
    "state": "open",
    "checks": [
      { "name": "quality", "state": "success" },
      { "name": "test (ubuntu)", "state": "success" },
      { "name": "e2e", "state": "success" }
    ],
    "mergeable": true
  }
}
```


