gh-pr-review

gh-pr-review is a skill for Claude Code, Codex from mir-am/skills-agents-ai-coding. It costs 17 tokens per session (3,704 once invoked), scanned A, original, MIT.

A workflow for reviewing a GitHub pull request with the gh command-line tool. It retrieves the request’s details and code changes, then produces structured feedback.

In plain words
What is it for?
It helps inspect a pull request, assess its changes by severity, and save the review as a Markdown file in .opencode/review/.
Why use it?
It gathers the relevant branches, metadata, changed files, and full diff in one review process. It also flags unusually large pull requests before continuing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit It helps inspect a pull request, assess its changes by severity, and save the review as a Markdown file in .opencode/review/.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mir-am/skills-agents-ai-coding/gh-pr-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mir-am/skills-agents-ai-coding --skill gh-pr-review
Clone the repo
git clone --depth 1 https://github.com/mir-am/skills-agents-ai-coding

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-pr-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/mir-am/skills-agents-ai-coding/gh-pr-review/github.svg)](https://agentmods.dev/skills/mir-am/skills-agents-ai-coding/gh-pr-review)
Your own site
<a href="https://agentmods.dev/skills/mir-am/skills-agents-ai-coding/gh-pr-review"><img src="https://agentmods.dev/badge/skills/mir-am/skills-agents-ai-coding/gh-pr-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-pr-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/mir-am/skills-agents-ai-coding/gh-pr-review"><img src="https://agentmods.dev/badge/skills/mir-am/skills-agents-ai-coding/gh-pr-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.03704
Opus 5 $0.00009 $0.01852
Sonnet 5 $0.00003 $0.00741
Haiku 4.5 $0.00002 $0.00370

Measured 11d ago against content hash 334287bee8d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

gh-pr-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gh-pr-review/SKILL.md · 481 lines

How it starts

The opening of the file, as written. The whole thing — 481 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What I do

  • Validate GitHub CLI (gh) is installed and authenticated
  • Fetch PR metadata (title, body, author, branches, state)
  • Retrieve full diff and list of changed files
  • Generate structured code review with severity-based feedback
  • Write review to .opencode/review/ directory as markdown
  • Warn on large PRs (>20 files) and ask user to confirm

When to use me

Use this skill when the user asks to review a GitHub Pull Request by its number.

Trigger examples:

  • "Review PR #123"
  • "Review pull request 456"
  • "Analyze PR 789"

Prerequisites

  1. GitHub CLI installed: gh must be available

    • Check: command -v gh >/dev/null 2>&1
    • If not found: "Error: GitHub CLI not found. Install from: https://cli.github.com/"
  2. Authenticated with GitHub: User must be logged in

    • Check: gh auth status
    • If not authenticated: "Error: Not authenticated with GitHub. Run: gh auth login"
  3. GitHub remote: Repository must have a GitHub remote configured

    • Check: gh repo view --json nameWithOwner
    • If fails: "Error: This repository does not have a GitHub remote configured."

PR Number Extraction

Extract the PR number from user input:

  • Pattern: #?(\d+) (supports with or without #)
  • Examples: "#123" → 123, "PR 456" → 456, "pull request 789" → 789
  • If no number found: "Error: Please provide a valid PR number (e.g., 'review PR #123')."

Validation Workflow

  1. Validate prerequisites (run in parallel):

    command -v gh >/dev/null 2>&1 && echo "gh found" || echo "gh not found"
    
    gh auth status
    
    gh repo view --json nameWithOwner -q .nameWithOwner
    
  2. Validate PR exists:

    gh pr view <PR_NUMBER> --json number,state
    
    • If fails: "Error: PR # not found. Verify the PR number and repository."

Data Gathering Workflow

After validation passes, fetch PR data in parallel:

1. Get PR Metadata

gh pr view <PR_NUMBER> --json title,body,author,baseRefName,headRefName,number,state,url,additions,deletions

Read the full file on GitHub · 481 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 481 lines · 17 tokens per session scan A 334287bee8d3

Subscribe to this mod's changes

gh-pr-review is a skill published in the GitHub repository mir-am/skills-agents-ai-coding (2 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 3,704 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

github

GitHub operations via gh CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available)…

understudy-ai/understudy · 101 tokens

git-workflow

Conventional commits, PR creation, and quality gate verification.

andreibesleaga/GABBE · 15 tokens

review-gate

HARD GATE before PR creation - verifies review artifact exists in issue comments, all findings addressed or tracked, blocks PR creation if requirements not met.

troykelly/claude-skills · 33 tokens

hunk-extensions

Maps the hunkdiff/extension authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked panes, alternate file views, commands and key bindings, dialogs, workspace writes, themes, syntax languages, VCS backends, lifecycle events. Use when writing, debugging, or installing a Hunk…

modem-dev/hunk · 105 tokens

hunk-launch-video

Produces Hunk videos by driving the real TUI headlessly in a PTY, compositing captioned 1080p frames in Chromium, and encoding with ffmpeg. Use for feature demos, workflow explainers, announcements, launch videos, and full-release roundups.

modem-dev/hunk · 60 tokens

hunk-release

Prepares, publishes, verifies, and curates Hunk releases. Use for release metadata, benchmarks, tags, publishing, release videos, backports, or recovery.

modem-dev/hunk · 38 tokens