Agent skill

PR Review

by jaemk in jaemk/cached

Targeted, read-only review of a PR or checked-out branch. An agent skill from jaemk/cached.

MITAuto-check: notesDevelopment

Install PR Review

skills CLI
$ npx skills add jaemk/cached --skill pr-review -a claude-code

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

GitHub CLI
$ gh skill install jaemk/cached 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/jaemk/cached.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pr-review .claude/skills/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
pr-review
GitHub stars
2.1k
Token cost
~2.5k tokens
SKILL.md length
1,356 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Targeted, read-only review of a PR or checked-out branch. An agent skill from jaemk/cached.

  • Works in 5 steps: Acquire the diff and build the review… → Shard each set into appropriately sized,… → Spawn one sub-agent per shard, in parallel → …
  • Asked to review this PR
  • SKILL.md covers Scope — what this does and…, Model tiers, Input and Steps
  • Calls git, make and gh

What it does

PR Review is an agent skill from jaemk/cached. Targeted, read-only review of a PR or checked-out branch. Acquires the diff (a PR number, or the current branch vs origin/master), shards the changed material into appropriately sized, randomized chunks, and spawns multiple read-only code-review and library-consumer sub-agents in parallel (one per shard), then aggregates and de-duplicates their findings into a single report with severity and a valid / already-fixed / invalid verdict for each. Read-only — it does not edit files, commit, push, or touch the GitHub…

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests, Subagents and Code review. It works with GitHub and Rust. The repository describes itself as: Rust cache structures and easy function memoization. The licence is MIT.

When your agent uses it

  • Asked to review this PR
  • Review the branch
  • Whats wrong with this diff
  • Do a code review

Example prompts

  • “review this PR”
  • “review the branch”
  • “s wrong with this diff”
  • “/pr-review”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Agent

Workflow steps

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

  1. Acquire the diff and build the review inventory
  2. Shard each set into appropriately sized, randomized chunks
  3. Spawn one sub-agent per shard, in parallel
  4. Evaluate all findings (de-duplicate across shards)
  5. Report

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Agent

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • make
    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

PR Review loads about 2.5k tokens when it runs. Until then it costs about 216 tokens; SKILL.md has 1,356 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~216
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Agent

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 jaemk/cached at commit 9da0ec2, republished under its MIT licence (© jaemk). 1,356 words, ~2,532 tokens.

Download SKILL.mdSave it as .claude/skills/pr-review/SKILL.md (or your agent's skills folder).
name
pr-review
description
Targeted, read-only review of a PR or checked-out branch. Acquires the diff (a PR number, or the current branch vs origin/master), shards the changed material into appropriately sized, randomized chunks, and spawns multiple read-only code-review and library-consumer sub-agents in parallel (one per shard), then aggregates and de-duplicates their findings into a single report with severity and a valid / already-fixed / invalid verdict for each. Read-only — it does not edit files, commit, push, or touch the GitHub PR conversation. The review sub-agents default to Sonnet but can be overridden per run (e.g. to opus). Use when asked to "review this PR", "review the branch", "what's wrong with this diff", "do a code review", or "review with opus". For the full review → fix → push → resolve loop, use `pr-cycle` (which delegates its review step here).
allowed-tools
Bash, Read, Agent

PR Review

Produce a fresh, read-only review of a PR or a checked-out branch and report the findings. This is the "review" half of the PR workflow, extracted so it can be run on its own. The orchestrator skill pr-cycle calls this skill to obtain its local findings, then goes on to address, push, and resolve them.

Scope — what this does and does not do

Does: acquire the diff, shard it into appropriately sized chunks, spawn the read-only review sub-agents (one per shard, multiple of each type), evaluate and de-duplicate their findings, and report them with severity and a verdict.

Does NOT: edit files, run make ci, regenerate the README, commit, or push; and it does not interact with the GitHub PR conversation — it does not read existing PR comments/threads, resolve or minimize them, edit the PR body, or re-request Copilot review. Those belong to pr-cycle. This skill only generates a fresh agent-based review of the code itself.

This skill is purely advisory: its output is a findings report for a human (or for pr-cycle) to act on. It applies no changes.

Model tiers

TierWhatStepModel
1 — cheap delegationRead-only review sub-agents, one per shard3Sonnet (pinned in agent def; overridable per-run, e.g. to opus — see Input)
2 — judgment coreShard the material; de-duplicate and classify findings into valid / already-fixed / invalid2, 4, 5session model (use Opus)

Input

A target and an optional review-agent model override, in any order.

  • Target: either a PR number, or nothing (review the current checked-out branch). If a PR number is omitted you may infer one from the current branch with gh pr view --json number (run with the sandbox disabled — see below), but a PR is not required: a plain checked-out branch is reviewed by diffing against origin/master.
  • Review-agent model: the model used by the two reviewer types (pr-code-reviewer, pr-consumer-reviewer) defaults to sonnet, but can be overridden. If the input names a model (e.g. "review with opus", "opus reviewers", "model=opus"), pass that model to the Agent tool's model parameter when spawning all shard sub-agents in step 3. With no override, omit model so each agent uses its pinned Sonnet default.
  • Shard sizing (optional): by default the orchestrator sizes shards automatically from the review-agent model — smaller shards for cheaper models, larger for stronger ones (see step 2). Override with an explicit target in the input if you want finer or coarser splitting, e.g. "shards of ~4 files", "one file per shard", or "single shard" (the latter restores the old whole-diff-per-reviewer behavior).

Announce the resolved target and review-agent model at the start — e.g. "Reviewing the current branch with opus reviewers" or "Reviewing PR #264 with Sonnet reviewers" — before spawning anything. After sharding (step 2), announce the shard counts (e.g. "3 code shards, 2 consumer shards") before spawning the reviewers.

Steps

1. Acquire the diff and build the review inventory

The diff is git diff origin/master, which works for any checked-out branch whether or not it has a PR:

bash
git diff origin/master
git diff origin/master --stat

If you are targeting a specific PR, the pr-cycle helper prints the identical diff and is equivalent (.agents/skills/pr-cycle/pr.py PR_NUMBER diff).

From the changed-file list, build an inventory of review units. A unit is normally one changed file, with one exception: keep atomic couplings together as a single unit — a trybuild tests/ui/<case>.rs and its matching <case>.stderr (and any paired source) must travel together, since reviewing one without the other is meaningless.

Tag each unit with the reviewer type(s) it needs:

  • Code-review set — all code: cached_proc_macro/src/, src/, tests/, examples. Essentially every changed .rs file and golden file.
  • Consumer-review set — public-facing surface only: src/lib.rs, the public APIs in src/stores/, cached_proc_macro/src/lib.rs (the macro attribute surface), README.md, CHANGELOG.md, docs/migrations/, and examples/. Internal macro plumbing and internal test helpers are not consumer-relevant.

A unit may belong to both sets (e.g. src/lib.rs).

2. Shard each set into appropriately sized, randomized chunks

The code set and the consumer set are sharded independently. Sharding has two jobs: keep each shard small enough that the review model attends to every line, and vary the grouping between rounds so repeated reviews surface different findings.

a. Pick the target shard size from the review-agent model. Cheaper models get smaller shards; stronger models absorb more per shard without losing attention:

Review modelTarget per shard
sonnet (default)~600-900 changed diff lines, or ~4-6 units
opus~1500-2500 changed diff lines, or ~10-15 units

An explicit shard-size override from the Input wins over this table. Use the --stat line counts from step 1 for packing.

b. Randomize the grouping, then pack. Produce a fresh random ordering of the units each run — shuf reseeds from the OS on every invocation, so each round yields a different permutation:

bash
git diff origin/master --name-only | shuf

Pack the shuffled unit list greedily: add units to the current shard until adding the next would exceed the target size, then start a new shard. Because the order is reshuffled every round, a given file lands with different neighbors each time — reviewers see different cross-file context and surface different cross-cutting findings. Do not re-sort the shuffled list into a tidy order; the randomness is the point. (Atomic couplings from step 1 stay intact as one unit through the shuffle.)

This yields some number of code shards and consumer shards (each typically a handful). Announce the counts before spawning.

Show full SKILL.md (480 more words)Show less
3. Spawn one sub-agent per shard, in parallel

For each code shard, spawn a pr-code-reviewer. For each consumer shard, spawn a pr-consumer-reviewer. Every agent's prompt must include:

  • The target (PR number, or branch name if there is no PR)
  • The explicit list of files in its shard
  • An instruction to scope its review to those files: acquire its slice with git diff origin/master -- <files...> and Read those files in full for context, but report findings only on the assigned files.
  • (consumer shards only) a pointer to the current src/lib.rs doc comments and README.md for the APIs its files touch.

Both agent types are read-only (no Edit/Write) and carry their full rubrics in their agent definitions — do not re-specify the rubric in the prompt.

Model override: if the input requested a review-agent model (see Input), pass it to the Agent tool's model parameter on every spawn (e.g. model: "opus"). With no override, omit model so each agent uses its pinned Sonnet default.

Spawn all shard agents in a single message so they run concurrently, and wait for all to complete before proceeding. (Harness concurrency is capped; excess agents queue and still complete.)

4. Evaluate all findings (de-duplicate across shards)

Collect every shard's report. Shards are disjoint, so most findings are unique, but a cross-cutting issue can be reported by more than one shard (or by both a code and a consumer reviewer) — merge duplicates into one finding before judging. For each finding, assign a verdict and explain your reasoning:

  • Valid — the concern is real and the code should change.
  • Already fixed — the concern was valid in principle but the current code already handles it (the reviewer was working from a partial view).
  • Invalid — the finding is incorrect or environment-specific (e.g. a rustc version mismatch on trybuild golden files, or a "missing" feature gate that is actually present).

This verdict pass is the judgment core; run it on the session model (use Opus). Do not soften or pad — an invalid finding called valid sends pr-cycle (or a human) chasing a non-issue.

5. Report

Present a single consolidated report:

  • The target reviewed (PR number or branch name) and the review-agent model used.
  • Sharding: how many code shards and consumer shards ran, and the target shard size used.
  • Code-reviewer findings: total count (after de-dup), broken down by severity (high / medium / low), and by verdict (valid / already-fixed / invalid).
  • Consumer-reviewer findings: the same breakdown.
  • For each valid finding: a one-line summary, the file:line (or area), and why it matters — enough that pr-cycle or a human can act on it without re-reading the agent output.
  • For each invalid or already-fixed finding: a one-line note on why it was ruled so.
  • A closing one-line verdict: is the branch/PR clean, or are there valid findings to address (and how many high/medium)?

Do not apply any fix. If the caller wants the findings addressed and pushed, that is pr-cycle's job.

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

Files

Just SKILL.md in .agents/skills/pr-review of jaemk/cached.

Open the folder on GitHubat commit 9da0ec2

Compare with similar skills

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.

PR Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Review this skilljaemk/cached2.1k—~2.5kAutomated safety check: NotesMIT
PR Reviewjaemk/self_update961—~1.5kAutomated safety check: NotesMIT
GitHub Review Iterationprisma/orm48k—~2.2kAutomated safety check: PassApache-2.0
Cherry Studio PR ReviewCherryHQ/cherry-studio52k—~3.9kAutomated safety check: PassAGPL-3.0
Pull Request Code Review Orchestratoropeninterpreter/openinterpreter69k2 repos~163Automated safety check: PassApache-2.0
Resolve PR Reviewshencangsheng/easydb_app590—~2.4kAutomated safety check: PassMIT

Similar skills

  • PR Review

    jaemk/self_update

    Targeted, read-only review of a PR or checked-out branch. An agent skill from jaemk/self_update.

    961 GitHub stars~1.5k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Cherry Studio PR Review

    CherryHQ/cherry-studio

    Reviews Cherry Studio branches, pull requests, commits, files and docs against the project's own architecture, naming, API-boundary and UI rules, report-only by default.

    52k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Resolve PR Review

    shencangsheng/easydb_app

    Resolve pull request code review comments end-to-end. An agent skill from shencangsheng/easydb_app.

    590 GitHub stars~2.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Firewood Review

    ava-labs/firewood

    A skill your agent uses when reviewing ava-labs/firewood code changes — pull request or local workspace.

    153 GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check: notes

More from jaemk/cached

  • PR Cycle

    jaemk/cached

    PR review-and-update cycle — the orchestrator that takes a PR from review to resolved.

    2.1k GitHub stars~4.8k tokensUpdated 8 days ago
    Auto-check: notes
  • Release

    jaemk/cached

    Prepare a release (bump versions across all Cargo.toml files, update CHANGELOG.md, refresh the migration guide, regenerate README, commit), or run a pre-release review.

    2.1k GitHub stars~2.8k tokensUpdated 8 days ago
    Auto-check passed
  • Review a library/package from the perspective of an external downstream consumer — build a throwaway crate/project that depends on it the way a real user would, exercise the public API, and surface…

    2.1k GitHub stars~1.9k tokensUpdated 8 days ago
    Auto-check passed

Works with

Categories

Questions about PR Review

What does PR Review do?

Targeted, read-only review of a PR or checked-out branch. An agent skill from jaemk/cached. PR Review is an agent skill from jaemk/cached. Targeted, read-only review of a PR or checked-out branch.

When should I use PR Review?

PR Review fits situations like: asked to review this PR; review the branch; whats wrong with this diff; do a code review.

How do I install PR Review in Claude Code?

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

How do I install PR Review in Codex?

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

Can I use 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 jaemk/cached --skill 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/pr-review, .gemini/skills/pr-review, .github/skills/pr-review and .opencode/skills/pr-review in your project.

What does PR Review need to run?

Going by SKILL.md and its folder, PR Review needs the command-line tools its instructions call (git, make and gh). Its frontmatter pre-approves these tools: Bash, Read, Agent.

Does PR Review access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Review safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does PR Review use?

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 PR Review use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Review?

Skills that share tags, products or a category with PR Review: PR Review (jaemk/self_update, 961 stars), GitHub Review Iteration (prisma/orm, 48k stars), Cherry Studio PR Review (CherryHQ/cherry-studio, 52k stars) and Pull Request Code Review Orchestrator (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Review?

jaemk (a GitHub user) maintains it in jaemk/cached, which has 2,098 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 1, 2026.

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