Agent skill

GitHub PR Review

by OpenHands in OpenHands/extensions

Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels.

MITAuto-check passedDevelopment

Install GitHub PR Review

skills CLI
$ npx skills add OpenHands/extensions --skill github-pr-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenHands/extensions github-pr-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenHands/extensions.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/github-pr-review .claude/skills/github-pr-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
github-pr-review
GitHub stars
157
Token cost
~2.3k tokens
SKILL.md length
383 words
Files
7 (incl. references)
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels.

  • Works in 2 steps: Create a JSON file → Post the review
  • Tasks that involve Pull requests
  • SKILL.md covers Key Rule: One API Call, Posting a Review and Priority Labels
  • Calls gh, curl and git; reaches api.github.com; needs GITHUB_TOKEN

What it does

GitHub PR Review is an agent skill from OpenHands/extensions. Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `.plugin/plugin.json`, `README.md` and `commands/github-pr-review.md`).

It sits in Development, covering Pull requests and Technical documentation. It works with GitHub. The repository describes itself as: Public registry for OpenHands extensions. The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests
  • Tasks that involve Technical documentation

Example prompts

  • “/github-pr-review”

Requirements

  • A credential in GITHUB_TOKEN

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Create a JSON file
  2. Post the review

What it can do on your machine

Read from SKILL.md and the folder at commit d008b81. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • curl
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitHub PR Review loads about 2.3k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 383 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenHands/extensions at commit d008b81, republished under its MIT licence (© OpenHands). 383 words, ~2,273 tokens.

Download SKILL.mdSave it as .claude/skills/github-pr-review/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
github-pr-review
description
Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels.
triggers
/github-pr-review

GitHub PR Review

Post structured code review feedback using the GitHub API with inline comments on specific lines. Windows PowerShell equivalents for JSON file creation, temp paths, line lookup, and fallback curl are in references/windows.md.

Key Rule: One API Call

Bundle ALL comments into a single review API call. Do not post comments individually.

Posting a Review

Use the GitHub CLI (gh) with a JSON input file. The GITHUB_TOKEN is automatically available.

Important: Always use --input with a JSON file instead of -F flags. This avoids shell quoting issues with special characters in comment bodies (quotes, backticks, newlines, etc.) and eliminates the need for complex heredoc scripts.

Step 1: Create a JSON file
bash
cat > /tmp/review.json << 'EOF'
{
  "commit_id": "{commit_sha}",
  "event": "COMMENT",
  "body": "Brief 1-3 sentence summary.",
  "comments": [
    {
      "path": "path/to/file.py",
      "line": 42,
      "side": "RIGHT",
      "body": "🟠 Important: Your comment here."
    },
    {
      "path": "another/file.js",
      "line": 15,
      "side": "RIGHT",
      "body": "🟡 Suggestion: Another comment."
    }
  ]
}
EOF
Step 2: Post the review
bash
gh api -X POST repos/{owner}/{repo}/pulls/{pr_number}/reviews --input /tmp/review.json
Parameters
ParameterDescription
commit_idCommit SHA to comment on (use git rev-parse HEAD)
eventAPPROVE, COMMENT, or REQUEST_CHANGES (see below)
pathFile path as shown in the diff
lineLine number in the NEW version (right side of diff)
sideRIGHT for new/added lines, LEFT for deleted lines
bodyComment text with priority label
Choosing the event Value
EventWhen to use
APPROVENo issues found, or only 🟡 suggestions that are non-blocking
COMMENTYou have 🟠 Important feedback but it's not a hard blocker
REQUEST_CHANGESThere are 🔴 Critical issues that must be fixed before merge

Default to APPROVE when the code is correct and merge-ready. Use COMMENT or REQUEST_CHANGES only when there are actionable issues that warrant it.

Show full SKILL.md (148 more words)Show less
Multi-Line Comments

For comments spanning multiple lines, add start_line to specify the range:

json
{
  "path": "path/to/file.py",
  "start_line": 10,
  "line": 12,
  "side": "RIGHT",
  "body": "🟡 Suggestion: Refactor this block:\n\n```suggestion\nline_one = \"new\"\nline_two = \"code\"\nline_three = \"here\"\n```"
}

start_line/line define the range that will be REPLACED. The suggestion block may have any number of lines — it does not have to match the range size. See the next section for the exact semantics; getting this wrong is how suggestions silently delete or duplicate code.

Priority Labels

Start each comment with a priority label. Minimize nits - leave minor style issues to linters.

LabelWhen to Use
🔴 CriticalMust fix: security vulnerabilities, bugs, data loss risks
🟠 ImportantShould fix: logic errors, performance issues, missing error handling
🟡 SuggestionWorth considering: significant improvements to clarity or maintainability

Do NOT post 🟢 Nit or 🟢 Acceptable comments. If code is fine, simply don't comment on it. Inline comments that say "this looks good" or "acceptable trade-off" are noise — they create review threads that must be resolved without providing actionable value.

Example:

🟠 Important: This function doesn't handle None, which could cause an AttributeError.

```suggestion
if user is None:
    raise ValueError("User cannot be None")

## GitHub Suggestions

For small code changes, use the suggestion syntax for one-click apply:

~~~
```suggestion
improved_code_here()

Use suggestions for: renaming, typos, small refactors (1-5 lines), type hints, docstrings.

Avoid for: large refactors, architectural changes, ambiguous improvements.

### How Suggestions Actually Work (READ THIS BEFORE WRITING ONE)

A suggestion block **replaces** the targeted range with its contents. The replaced range is:

- `line` only → the single line `line` (replaces 1 line)
- `start_line` + `line` → the inclusive range `start_line..line` (replaces `line - start_line + 1` lines)

The suggestion content can be **any number of lines** — 0 (deletion), 1, or many. It does not have to match the range size. Whatever is between the ` ```suggestion ` and closing ` ``` ` fences becomes the new content of those lines.

Writing the wrong combination of `start_line`/`line` and suggestion body is what causes accepted suggestions to **duplicate** or **delete** code. Use the table below as your contract:

| Intent | `start_line` | `line` | Suggestion body must contain |
|--------|--------------|--------|-------------------------------|
| Change line N | omit | N | the new content for line N |
| Change lines N..M | N | M | the new content for the whole block |
| **Add** a line **after** line N (keep line N) | omit | N | line N's exact current text, then the new line(s) |
| **Add** a line **before** line N (keep line N) | omit | N | the new line(s), then line N's exact current text |
| **Insert** lines inside range N..M (keep N..M) | N | M | every original line in N..M plus the new lines, in the final desired order |
| **Delete** line N | omit | N | empty body (just an empty ` ```suggestion ``` ` block) |
| **Delete** lines N..M | N | M | empty body |

### Common Mistakes That Break Code

1. **Duplicated lines.** You copy a neighboring line (N-1 or N+1) into the suggestion body as context — that line is still present in the file outside the replaced range, so accepting the suggestion inserts a second copy of it. Fix: only include lines that fall within the targeted range, plus any genuinely new content.
2. **Disappearing lines.** You target `start_line=10, line=12` to comment on a 3-line block, but your suggestion body only contains 1 line because you "only want to change line 11". Accepting that suggestion deletes lines 10 and 12. Fix: either narrow the range to just line 11, or include lines 10 and 12 verbatim in the body.
3. **Description does not match the suggestion.** The prose says "rename this variable" but the suggestion replaces an entire function. Or the prose says "add a None check" but the suggestion only contains the check (deleting the original code). Fix: after writing the suggestion, re-read the prose and confirm the resulting file would match it line-for-line.

### Mandatory Verification Before Posting

For every comment that contains a ` ```suggestion ``` ` block, do this check before adding it to the review JSON:

1. Read the actual file lines that will be replaced: `sed -n '<start_line>,<line>p' <path>` (or `sed -n '<line>p' <path>` for a single-line target).
2. Mentally apply the suggestion: drop those lines, splice in the suggestion body, and look at the result in context.
3. Confirm the resulting code matches **exactly** what your prose description promises — no extra duplicated line above/below, no original line accidentally dropped, no off-by-one.
4. If the change cannot be expressed cleanly as a contiguous replacement (e.g., it touches non-adjacent lines, or it depends on edits elsewhere in the file), do **not** use a suggestion block — describe the change in prose instead.

If you are not 100% sure the suggestion will produce the exact code you described, drop the ` ```suggestion ``` ` block and leave a regular inline comment. A correct prose comment is always better than a one-click suggestion that silently corrupts the file.

## Finding Line Numbers

```bash
# From diff header: @@ -old_start,old_count +new_start,new_count @@
# Count from new_start for added/modified lines

grep -n "pattern" filename     # Find line number
head -n 42 filename | tail -1  # Verify line content
```

## Fallback: curl

If `gh` is unavailable, use curl with the JSON file:

```bash
curl -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github+json" \
  "https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}/reviews" \
  -d @/tmp/review.json
```

## Summary

1. Analyze the code and identify important issues (minimize nits)
2. Write review data to a JSON file (e.g., `/tmp/review.json`)
3. Post **ONE** review using `gh api --input /tmp/review.json`
4. Use priority labels (🔴🟠🟡) on every comment
5. Do NOT post comments for code that is acceptable — only comment when action is needed
6. Use suggestion syntax for concrete code changes, but only after verifying the resulting code matches your description (see "How Suggestions Actually Work")
7. Keep the review body brief (details go in inline comments)
8. If no issues: use `"event": "APPROVE"` with a short approval message and no inline comments

© OpenHands, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/github-pr-review of OpenHands/extensions.

  • SKILL.md
  • .claude-plugin
  • .codex-plugin
  • .plugin/plugin.json
  • README.md
  • commands/github-pr-review.md
  • references/windows.md

Open the folder on GitHubat commit d008b81

Compare with similar skills

GitHub PR Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitHub PR Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub PR Review this skillOpenHands/extensions157—~2.3kAutomated safety check: PassMIT
Post Draft Reviewagent-substrate/substrate4.5k—~2.8kAutomated safety check: PassApache-2.0
Review Kedro PRkedro-org/kedro11k—~2.8kAutomated safety check: PassCustom licence
Review PRjavierbrea/eslint-plugin-boundaries997—~2.9kAutomated safety check: PassMIT
Inline PR Commentshyperlane-xyz/hyperlane-explorer102—~1.1kAutomated safety check: PassCustom licence
Clarify Java CommentsDataDog/dd-trace-java736—~2.3kAutomated safety check: NotesApache-2.0

Similar skills

  • Post Draft Review

    agent-substrate/substrate

    Posts pull request review findings as GitHub draft (pending) inline comments for a human to edit and submit, instead of publishing them straight to the PR author.

    4.5k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Review Kedro PR

    kedro-org/kedro

    Review a Kedro PR for checklist compliance, architecture, correctness, and clarity.

    11k GitHub stars~2.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Review PR

    javierbrea/eslint-plugin-boundaries

    Review a GitHub pull request from three perspectives — functional fit against its linked issue, code correctness/quality, and architectural boundaries — then post a single GitHub review: one general…

    997 GitHub stars~2.9k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Inline PR Comments

    hyperlane-xyz/hyperlane-explorer

    Post a single consolidated PR review with summary and inline comments.

    102 GitHub stars~1.1k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Clarify Java Comments

    DataDog/dd-trace-java

    Official

    Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment.

    736 GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Process PR Reviews

    nexu-io/nexu

    A skill your agent uses when the user asks to process, triage, fetch, view, count, list, or resolve review feedback in a GitHub PR.

    3.3k GitHub stars~2.5k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed

More from OpenHands/extensions

All 78 skills in this repo
  • Agent Readiness Report

    OpenHands/extensions

    Evaluate how well a codebase supports autonomous AI-assisted development.

    157 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Discord

    OpenHands/extensions

    Build and automate Discord integrations (bots, webhooks, slash commands, and REST API workflows).

    157 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • GitHub

    OpenHands/extensions

    Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

    157 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • GitHub Issue To PR

    OpenHands/extensions

    Create an automation that implements GitHub issues when a configurable trigger label is applied.

    157 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • GitHub Repo Monitor

    OpenHands/extensions

    This skill should be used when the user asks to "monitor a GitHub repository", "watch GitHub for issues or PRs", "respond to @OpenHands mentions on GitHub", "set up an OpenHands GitHub integration"…

    157 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • GitLab Issue To Mr

    OpenHands/extensions

    Create an automation that implements GitLab issues when a configurable trigger label is applied.

    157 GitHub stars~4.9k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about GitHub PR Review

What does GitHub PR Review do?

Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels. GitHub PR Review is an agent skill from OpenHands/extensions. Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels.

When should I use GitHub PR Review?

GitHub PR Review fits situations like: tasks that involve Pull requests; tasks that involve Technical documentation.

How do I install GitHub PR Review in Claude Code?

Run `npx skills add OpenHands/extensions --skill github-pr-review -a claude-code`. Or copy the skill folder (skills/github-pr-review in OpenHands/extensions) into .claude/skills/github-pr-review in your project. Claude Code loads it when a task matches its description.

How do I install GitHub PR Review in Codex?

Run `npx skills add OpenHands/extensions --skill github-pr-review -a codex`. Or copy the skill folder (skills/github-pr-review in OpenHands/extensions) into .agents/skills/github-pr-review in your project. Codex loads it when a task matches its description.

Can I use GitHub PR Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenHands/extensions --skill github-pr-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github-pr-review, .gemini/skills/github-pr-review, .github/skills/github-pr-review and .opencode/skills/github-pr-review in your project.

What does GitHub PR Review need to run?

Going by SKILL.md and its folder, GitHub PR Review needs the command-line tools its instructions call (gh, curl and git) and credentials named GITHUB_TOKEN. Our summary lists: A credential in GITHUB_TOKEN.

Does GitHub PR Review access the network?

SKILL.md names 1 domain. In commands or code: api.github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is GitHub PR Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does GitHub PR Review use?

GitHub PR Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitHub PR Review use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 289 tokens, read only when the agent opens those files.

What are the alternatives to GitHub PR Review?

Skills that share tags, products or a category with GitHub PR Review: Post Draft Review (agent-substrate/substrate, 4.5k stars), Review Kedro PR (kedro-org/kedro, 11k stars), Review PR (javierbrea/eslint-plugin-boundaries, 997 stars) and Inline PR Comments (hyperlane-xyz/hyperlane-explorer, 102 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub PR Review?

OpenHands (a GitHub organization) maintains it in OpenHands/extensions, which has 157 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

Source: OpenHands/extensions on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.