Fetch a GitHub pull request, read the diff, and produce a structured code review summary.
When to Use
You want an automated first-pass review before human review
You need a quick summary of what changed in a PR
When NOT to Use
The PR contains generated files or lock files (too noisy)
Security-sensitive diffs that should only be seen by authorized humans
Inputs
Name
Type
Required
Description
repo
string
yes
"owner/repo" format
pr_number
int
yes
Pull request number
github_token
string
no
PAT for private repos
Outputs
Name
Type
Description
summary
string
Plain English summary of changes
files_changed
list
List of changed file paths
risk_level
string
low/medium/high estimated risk
Example
import os, requests
def review_pr(repo: str, pr_number: int, token: str = None) -> dict:
headers = {"Accept": "application/vnd.github.v3+json"}
if token:
headers["Authorization"] = f"token {token}"
url = f"https://api.github.com/repos/{repo}/pulls/{pr_number}/files"
resp = requests.get(url, headers=headers)
resp.raise_for_status()
files = resp.json()
changed = [f["filename"] for f in files]
additions = sum(f["additions"] for f in files)
deletions = sum(f["deletions"] for f in files)
risk = "low"
if additions + deletions > 500:
risk = "medium"
if any("security" in f or "auth" in f or "password" in f for f in changed):
risk = "high"
return {
"summary": f"PR changes {len(changed)} files (+{additions}/-{deletions} lines)",
"files_changed": changed,
"risk_level": risk,
}
# result = review_pr("owner/repo", 42, token=os.environ["GITHUB_TOKEN"])
Notes
Respects GitHub API rate limits (60 req/hr unauthenticated, 5000 with token)
Does not post comments — only reads
1---2name: github-pr-review3description: GitHub PR Review4---56# GitHub PR Review78## Description910Fetch a GitHub pull request, read the diff, and produce a structured code review summary.1112## When to Use1314- You want an automated first-pass review before human review15- You need a quick summary of what changed in a PR1617## When NOT to Use1819- The PR contains generated files or lock files (too noisy)20- Security-sensitive diffs that should only be seen by authorized humans2122## Inputs2324| Name | Type | Required | Description |25|------|------|---------|-------------|26| repo | string | yes | "owner/repo" format |27| pr_number | int | yes | Pull request number |28| github_token | string | no | PAT for private repos |2930## Outputs3132| Name | Type | Description |33|------|------|-------------|34| summary | string | Plain English summary of changes |35| files_changed | list | List of changed file paths |36| risk_level | string | low/medium/high estimated risk |3738## Example3940```python41import os, requests4243def review_pr(repo: str, pr_number: int, token: str = None) -> dict:44 headers = {"Accept": "application/vnd.github.v3+json"}45 if token:46 headers["Authorization"] = f"token {token}"4748 url = f"https://api.github.com/repos/{repo}/pulls/{pr_number}/files"49 resp = requests.get(url, headers=headers)50 resp.raise_for_status()51 files = resp.json()5253 changed = [f["filename"] for f in files]54 additions = sum(f["additions"] for f in files)55 deletions = sum(f["deletions"] for f in files)5657 risk = "low"58 if additions + deletions > 500:59 risk = "medium"60 if any("security" in f or "auth" in f or "password" in f for f in changed):61 risk = "high"6263 return {64 "summary": f"PR changes {len(changed)} files (+{additions}/-{deletions} lines)",65 "files_changed": changed,66 "risk_level": risk,67 }6869# result = review_pr("owner/repo", 42, token=os.environ["GITHUB_TOKEN"])70```7172## Notes7374- Respects GitHub API rate limits (60 req/hr unauthenticated, 5000 with token)75- Does not post comments — only reads
Run npx skillmds@latest add ashish993/github-pr-review in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
GitHub PR Review It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ashish993 (@ashish993) published this skill. Their other Agent Skills are listed on their SkillMD profile.