Official agent skill

PR Review State Fetch

by prisma in prisma/orm

Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

OfficialApache-2.0Auto-check passedDevelopment

Install PR Review State Fetch

skills CLI
$ npx skills add prisma/orm --skill review-fetch-phase -a claude-code

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

GitHub CLI
$ gh skill install prisma/orm review-fetch-phase --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/prisma/orm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills-contrib/review-fetch-phase .claude/skills/review-fetch-phase && 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
review-fetch-phase
GitHub stars
48k
Token cost
~767 tokens
SKILL.md length
257 words
Files
11 (incl. scripts)
Skills in repo
20
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

  • Works in 8 steps: Validate and parse PR URL, then compute… → Ensure exists. → Enforce artifact safety before… → …
  • Pulling the full review state of a pull request into local files
  • SKILL.md covers Inputs, Behavior, Schema contract and Error handling, plus 1 more section
  • Runs JavaScript scripts from its folder; calls node and gh; reaches github.com

What it does

Only the state-acquisition phase of a review loop runs here. Given a pull request URL and an optional output directory, which defaults to a wip/reviews folder named after the owner, repo and PR number, the scripts fetch the review state as schema version 2 JSON, validate it and derive the other files. Outputs are review-state.json, review-state.md, summary.txt and review-targets.json.

Before generating anything, a guard script checks that the output location stays untracked, asking git in a checkout or accepting a directory under the ignored wip tree in a Jujutsu workspace. Separate scripts then fetch, validate, render markdown, summarize as text and extract triage targets, which are unresolved review threads, reviews with body text and issue comments with body text.

The JSON is the canonical source and derived files can be regenerated from it, version 1 artifacts are not supported, and fetch failures are treated as operational errors. Commands are run from the skill's own directory.

When your agent uses it

  • Pulling the full review state of a pull request into local files
  • Extracting unresolved threads and comments for triage
  • Regenerating a review summary from saved state JSON

Example prompts

  • “Fetch the review state for https://github.com/acme/webapp/pull/123 and render the summary.”
  • “Pull the unresolved review threads for this PR into review-targets.json.”
  • “Regenerate the markdown and summary from the saved review-state.json.”

Requirements

  • Node.js, to run the bundled .mjs scripts
  • A GitHub pull request URL and access to it

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Validate and parse PR URL, then compute deterministic paths
  2. Ensure exists.
  3. Enforce artifact safety before generation (the artifacts must stay untracked). In a git checkout the guard asks git directly; in a Jujutsu…
  4. Run fetch script to produce canonical JSON
  5. Validate canonical JSON before deriving additional files
  6. Render markdown from canonical JSON
  7. Generate text summary from canonical JSON
  8. Extract deterministic triage targets for downstream bootstrap

What it can do on your machine

Read from SKILL.md and the folder at commit 19bbe0e. 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

    Ships 9 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • gh

    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:

    • github.com

    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 State Fetch loads about 767 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 257 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from prisma/orm at commit 19bbe0e, republished under its Apache-2.0 licence (© prisma). 257 words, ~767 tokens.

Download SKILL.mdSave it as .claude/skills/review-fetch-phase/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
review-fetch-phase
description
Fetches canonical PR review state and renders derived state artifacts. Use when the user wants the state acquisition phase only (fetch, render, summarize) for a review-framework PR.
argument-hint
[pr-url] [output-dir]

Review Fetch Phase

Run only the state acquisition phase of the review-framework loop:

fetch canonical review state JSON (v2), validate it, and render all derived artifacts via scripts.

Run commands from this skill directory. All script paths below are relative to it.

Inputs

  • Required:
    • PR URL (for example: https://github.com/OWNER/REPO/pull/123)
  • Optional:
    • output directory

If output directory is omitted, derive:

wip/reviews/<owner>_<repo>_pr-<number>/

Behavior

  1. Validate and parse PR URL, then compute deterministic paths:
    • <output-dir>/review-state.json
    • <output-dir>/review-state.md
    • <output-dir>/summary.txt
    • <output-dir>/review-targets.json
  2. Ensure <output-dir> exists.
  3. Enforce artifact safety before generation (the artifacts must stay untracked). In a git checkout the guard asks git directly; in a Jujutsu workspace with no git directory it accepts a directory under the workspace root's ignored wip/ tree:
bash
node ./scripts/guard-review-artifacts-ignored.mjs --dir <output-dir>
  1. Run fetch script to produce canonical JSON:
bash
node ./scripts/fetch-review-state.mjs --pr <PR_URL> --out-json <output-dir>/review-state.json
  1. Validate canonical JSON before deriving additional files:
bash
node ./scripts/validate-review-state.mjs --in <output-dir>/review-state.json
  1. Render markdown from canonical JSON:
bash
node ./scripts/render-review-state.mjs --in <output-dir>/review-state.json --out <output-dir>/review-state.md
  1. Generate text summary from canonical JSON:
bash
node ./scripts/summarize-review-state.mjs --in <output-dir>/review-state.json --format text --out <output-dir>/summary.txt
  1. Extract deterministic triage targets for downstream bootstrap:
bash
node ./scripts/extract-review-targets.mjs --in <output-dir>/review-state.json --out <output-dir>/review-targets.json

Target extraction includes:

  • unresolved review threads
  • pull-request reviews with body text
  • issue comments with body text

Schema contract

  • review-state.json is canonical and must be schema version 2.
  • No backward compatibility is provided for v1 artifacts.
  • Derived artifacts (review-state.md, summary.txt, review-targets.json) are regenerable from canonical JSON.
  • Review artifacts are generated files and must remain untracked in git.

Error handling

  • Treat fetch failures as operational errors.
  • If gh api fails with TLS/cert errors in sandbox (x509 / OSStatus -26276), fail fast and instruct rerun outside sandbox.
  • Never disable TLS verification.

Output to user

Return artifact paths:

  • review-state.json
  • review-state.md
  • summary.txt
  • review-targets.json

Suggest next step:

  • /review-triage-phase <PR_URL> [output-dir]

© prisma, Apache-2.0. 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 10 other files (scripts) in skills-contrib/review-fetch-phase of prisma/orm.

  • SKILL.md
  • package.json
  • scripts/extract-review-targets.mjs
  • scripts/fetch-review-state.mjs
  • scripts/guard-review-artifacts-ignored.mjs
  • scripts/guard-review-artifacts-ignored.test.mjs
  • scripts/render-review-state.mjs
  • scripts/render-review-state.test.mjs
  • scripts/review-artifacts.mjs
  • scripts/summarize-review-state.mjs
  • scripts/validate-review-state.mjs

Open the folder on GitHubat commit 19bbe0e

Compare with similar skills

PR Review State Fetch 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 State Fetch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Review State Fetch this skillprisma/orm48k—~767Automated safety check: PassApache-2.0
Greploop Appsmichaelshimeles/skills1.3k1 repos~3.6kAutomated safety check: PassMIT
PR Triagertk-ai/rtk83k—~2.5kAutomated safety check: NotesApache-2.0
Difit Reviewyoshiko-pg/difit3.2k—~1.2kAutomated safety check: PassMIT
Address PR Feedback for ruby-gitruby-git/ruby-git1.8k—~657Automated safety check: PassMIT
ExecuTorch PR Reviewpytorch/executorch5.1k—~2.9kAutomated safety check: PassCustom licence

Similar skills

  • Greploop Apps

    michaelshimeles/skills

    Loops on a large pull request, merge request or Perforce changelist, fixing Greptile findings until it scores 5/5 with no unresolved comments.

    1.3k GitHub starsUsed in 1 repo~3.6k tokens
    DevelopmentAuto-check passed
  • PR Triage

    rtk-ai/rtk

    Audits a repository's open pull requests, deep-reviews chosen ones and drafts review comments that are only posted after you approve them.

    83k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Difit Review

    yoshiko-pg/difit

    Review a specific diff (branch, commit, or GitHub PR) and show the findings as comments inside difit, the local diff viewer.

    3.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Addresses unresolved pull request review threads and suppressed (low-confidence) Copilot review comments on the current branch, folds each fix into the…

    1.8k GitHub stars~657 tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • ExecuTorch PR Review

    pytorch/executorch

    Reviews ExecuTorch pull requests or local branches for what CI cannot check, using a checklist, with an optional detailed line-by-line mode.

    5.1k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Checks a pull request for lines that undo a recent bug fix by comparing what the PR removes with what labeled bug-fix PRs added to the same files.

    23k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from prisma/orm

All 20 skills in this repo
  • 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
    Auto-check passed
  • Official

    Implements triaged pull request review actions, commits focused fixes, posts status replies on GitHub and resolves the threads.

    48k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Official

    Runs the triage step of the review-framework loop: reads fetched PR review state, builds `review-actions.json`, validates it and renders `review-actions.md`.

    48k GitHub stars~995 tokensUpdated today
    Auto-check passed
  • Official

    Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.

    48k GitHub stars~830 tokensUpdated today
    Auto-check passed
  • Official

    Guides an outside contributor through opening a prisma/orm pull request from a fork that follows CONTRIBUTING.md and passes review on the first round.

    48k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Official

    Creates a GitHub pull request for the Prisma repo with a Linear-ticket-prefixed title and a decision-led narrative description, inferring the ticket from context.

    48k GitHub stars~4.6k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about PR Review State Fetch

What does PR Review State Fetch do?

Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts. Only the state-acquisition phase of a review loop runs here. Given a pull request URL and an optional output directory, which defaults to a wip/reviews folder named after the owner, repo and PR number, the scripts fetch the review state as schema version 2 JSON, validate it and derive the other files.

When should I use PR Review State Fetch?

PR Review State Fetch fits situations like: pulling the full review state of a pull request into local files; extracting unresolved threads and comments for triage; regenerating a review summary from saved state JSON.

How do I install PR Review State Fetch in Claude Code?

Run `npx skills add prisma/orm --skill review-fetch-phase -a claude-code`. Or copy the skill folder (skills-contrib/review-fetch-phase in prisma/orm) into .claude/skills/review-fetch-phase in your project. Claude Code loads it when a task matches its description.

How do I install PR Review State Fetch in Codex?

Run `npx skills add prisma/orm --skill review-fetch-phase -a codex`. Or copy the skill folder (skills-contrib/review-fetch-phase in prisma/orm) into .agents/skills/review-fetch-phase in your project. Codex loads it when a task matches its description.

Can I use PR Review State Fetch 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 prisma/orm --skill review-fetch-phase -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/review-fetch-phase, .gemini/skills/review-fetch-phase, .github/skills/review-fetch-phase and .opencode/skills/review-fetch-phase in your project.

What does PR Review State Fetch need to run?

Going by SKILL.md and its folder, PR Review State Fetch needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node and gh). Our summary lists: Node.js, to run the bundled .mjs scripts; A GitHub pull request URL and access to it.

Does PR Review State Fetch access the network?

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

Is PR Review State Fetch 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PR Review State Fetch use?

PR Review State Fetch is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Review State Fetch use?

About 767 tokens (SKILL.md is roughly 3.1k 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 State Fetch?

Skills that share tags, products or a category with PR Review State Fetch: Greploop Apps (michaelshimeles/skills, 1.3k stars), PR Triage (rtk-ai/rtk, 83k stars), Difit Review (yoshiko-pg/difit, 3.2k stars) and Address PR Feedback for ruby-git (ruby-git/ruby-git, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Review State Fetch?

prisma (a GitHub organization, an official publisher) maintains it in prisma/orm, which has 47,696 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 9, 2026.

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