review-pr
Skill630 starsChanged 25 days agoMITView on GitHub
Review a pull request diff and write structured feedback to review.json for the workflow to publish. Use when reviewing a checked-out PR from local artifacts like pr_diff.txt and pr_description.txt and producing machine-readable review output instead of posting directly to GitHub.
185 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- data-privacy-stack/presidiotheir own version, first seen Nov 9, 2026
- pgmpy/pgmpytheir own version, first seen Nov 9, 2026
- enes-alatas/spooltheir own version, first seen Nov 8, 2026
- microsoft/presidiotheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use docs-loop, full-loop and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GeiserXSkilldocs-loop
Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.
Also in 3 projects that use this
GeiserXSkillfull-loop
Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.
Also in 3 projects that use this
n24q02mSkillreview-delta
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.
Also in 3 projects that use this
n24q02mSkillbuild-graph
Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.
Also in 3 projects that use this
- +7 more from GeiserX
Other versions185 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- zerx-lab/warp★ 2.1k83% same
- zerx-lab/zap★ 2.1k83% same
- warpdotdev/oz-agent-action★ 12047% same
Wrote their own version · 182
- denoland/deno★ 109ksame name
- ToolJet/ToolJet★ 41ksame name
- remix-run/remix★ 33ksame name
- tirth8205/code-review-graph★ 33ksame name
- alpinejs/alpine★ 32ksame name
- nrwl/nx★ 29ksame name
- PrefectHQ/fastmcp★ 28ksame name
- jlowin/fastmcp★ 28ksame name
- livewire/livewire★ 24ksame name
- microsoft/fluentui★ 20ksame name
172 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- brandalfSkill
- check-impl-against-specSkill
- complainSkill
- councilSkill
- create-prSkill
- cross-critiqueSkill
- diagnose-ci-failuresSkill
- fix-errorsSkill
- implement-specsSkill
- merge-riskSkill
- migrate-to-factorySkill
- pr-walkthroughSkill
- readoutSkill
- reproduce-bug-reportSkill
- researchSkill
- resolve-merge-conflictsSkill
- respond-to-pr-comments-in-blocklistSkill
- sagaSkill
- scan-new-specsSkill
- skill-doctorSkill
- spec-driven-implementationSkill
- suggestion-boxSkill
- update-skillSkill
- validate-changes-match-specsSkill
- write-feature-docsSkill
- write-pr-descriptionSkill
- write-product-specSkill
- write-tech-specSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. 0 are common, 12 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 178 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
If spec_context.md exists, it contains spec context for implementation-vs-spec validation.
- Very specific: line 16
When the prompt references .agents/skills/review-pr/scripts/resolve_spec_context.py, use that script to materialize spec_context.md on …
- Distinctive: line 18
Do not post comments or reviews to GitHub directly.
- Distinctive: line 23
Treat comment quality and test quality as first-class review priorities alongside those — not as optional nits to mention only if time …
- Very specific: line 24
If the consuming repository provides a local security-review-pr companion skill or the prompt requests a security pass, apply it as …
- Very specific: line 25
When spec_context.md exists, use the repository's local check-impl-against-spec skill if available and treat material spec drift as a …
- Very specific: line 27
If a concern involves untouched code, mention it in top-level body instead of an inline comment.
- Distinctive: line 28
Do not suggest adding test cases that only vary constructor inputs or struct fields when the existing test already covers the meaningful …
- Distinctive: line 29
When a PR is clearly a V0 or initial implementation, frame robustness suggestions (timeouts, retries, lifecycle management) as optional …
- Distinctive: line 49
Every comment body must start with one of these labels:
- Distinctive: line 58
Write comments with these constraints:
- Distinctive: line 61
Do not add compliments or hedging.
- Distinctive: line 63
Keep ranges to at most 10 lines.
- Distinctive: line 65
Only create file-level or inline comments for files that exist in this PR's diff.
- Very specific: line 66
If the relevant file or line is not part of the diff, put the feedback in top-level body instead of comments.
- Very specific: line 67
Before adding each comment object, verify that its path, side, line, and optional start_line/start_side correspond to real annotations in …
- Distinctive: line 71
When proposing a code change, use:
- Very specific: line 82
Do not include lines outside that range.
- Very specific: line 85
When unsure of the surrounding context, widen start_line/line to include enough real lines from the diff rather than guessing at …
- Very specific: line 90
Create review.json with this shape:
- Very specific: line 130
Before drafting the top-level body or choosing verdict, complete this audit — a holistic read-through of the diff is not sufficient.
- Distinctive: line 133
Tests: Check every test the diff adds or changes against the repository's own testing guidelines, whatever form those take.
- Very specific: line 137
Before returning or uploading review.json:
- Distinctive: line 141
Run the bundled validator against the exact annotated diff you reviewed:
- Very specific: line 146
Do not run gh pr review, gh pr comment, gh api, or any other command that posts to GitHub.
“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review PR Skill
Review the current pull request and write the output to review.json.
Context
- The working directory is the PR branch checkout.
- The workflow usually provides an annotated diff in
pr_diff.txt. - The workflow usually provides the PR description in
pr_description.txt. - If
spec_context.mdexists, it contains spec context for implementation-vs-spec validation. - When the prompt references
.agents/skills/review-pr/scripts/resolve_spec_context.py, use that script to materializespec_context.mdon demand instead of expecting spec content to be embedded in the prompt. - Focus on files and lines changed by this PR.
- Do not post comments or reviews to GitHub directly.
Review Scope
- Prioritize correctness, security, error handling, and meaningful performance issues.
- Treat comment quality and test quality as first-class review priorities alongside those — not as optional nits to mention only if time allows; check both against the repository's own conventions before finalizing your verdict.
- If the consuming repository provides a local
security-review-prcompanion skill or the prompt requests a security pass, apply it as supplemental guidance on code PRs and fold any security findings into the samereview.jsonrather than emitting a separate output. - When
spec_context.mdexists, use the repository's localcheck-impl-against-specskill if available and treat material spec drift as a review concern. - Include style or nit comments only when you can provide a concrete suggestion block.
- If a concern involves untouched code, mention it in top-level
bodyinstead of an inline comment. - Do not suggest adding test cases that only vary constructor inputs or struct fields when the existing test already covers the meaningful behavior. Only suggest new tests when they exercise a distinct code path or edge case.
- When a PR is clearly a V0 or initial implementation, frame robustness suggestions (timeouts, retries, lifecycle management) as optional future work rather than blocking concerns, unless they risk correctness, security, or data loss.
Repository-specific guidance
Before reviewing, actively check whether the consuming repository ships a companion review-pr-local skill that specializes this one for its own conventions: if the prompt names one, read it there; otherwise look for one in the repository itself (for example, at .agents/skills/review-pr-local/SKILL.md, though a repository may place or name its specialization differently). If a companion exists, read it and apply its guidance as part of this review. If none turns up either way, rely on the core contract alone.
The companion is expected to specialize this skill's commenting and testing guidance with the repository's own conventions. It may never change the output JSON schema, the severity labels, the safety rules, the evidence rules, the suggestion-block constraints, or the diff-line-annotation contract described elsewhere in this skill.
Diff Line Annotations
The diff file uses these prefixes:
[OLD:n]for deleted lines on the old side. Use"LEFT".[NEW:n]for added lines on the new side. Use"RIGHT".[OLD:n,NEW:m]for unchanged context. Use"RIGHT"with linem.
Treat these annotations as the only source of truth for inline comment locations. For every inline comment you emit, first identify the exact annotated line in pr_diff.txt (or the inlined PR diff) and copy its path, side, and line number into review.json. Do not infer line numbers from prose, rendered GitHub views, file lengths, surrounding spec text, or unannotated snippets. If you cannot point to a specific [NEW:n], [OLD:n], or [OLD:n,NEW:m] line in the annotated diff, put the feedback in top-level body instead of comments.
Comment Requirements
Every comment body must start with one of these labels:
🚨 [CRITICAL]for bugs, security issues, crashes, or data loss.⚠️ [IMPORTANT]for logic problems, edge cases, or missing error handling.💡 [SUGGESTION]for worthwhile improvements or better patterns.🧹 [NIT]for cleanup only when the comment includes a suggestion block.
A confirmed violation of the repository's commenting or testing guidelines can warrant ⚠️ [IMPORTANT] on its own — regardless of how clean the rest of the PR is. Do not default these to 🧹 [NIT]/💡 [SUGGESTION] just because the surrounding code looks good.
Write comments with these constraints:
- Be concise, direct, and actionable.
- Do not add compliments or hedging.
- Prefer single-line comments.
- Keep ranges to at most 10 lines.
- Restrict inline comments to lines that appear explicitly in the annotated PR diff.
- Only create file-level or inline comments for files that exist in this PR's diff.
- If the relevant file or line is not part of the diff, put the feedback in top-level
bodyinstead ofcomments. - Before adding each comment object, verify that its
path,side,line, and optionalstart_line/start_sidecorrespond to real annotations in the same file's diff section.
Suggestion Blocks
When proposing a code change, use:
<replacement code here>Rules:
- Match the exact indentation of the original file.
- Include only replacement code.
- The block content replaces exactly the lines
start_line–lineinclusive. Every line inside the block becomes the new file content for that range, and GitHub leaves all other lines untouched. - Do not include lines outside that range. Lines above
start_lineand belowlineremain in the file; repeating them inside the block causes them to appear twice after the suggestion is committed. - Never open the block with a line that already appears immediately above
start_line, and never close the block with a line that already appears immediately belowline. If you need those lines as anchors, widenstart_lineorlineso they are actually part of the replaced range. - Count brace, bracket, paren, and block-delimiter depth (
{,[,(,end, etc.) across the original replaced lines and ensure the replacement ends at the same depth. Do not emit phantom closing tokens, and do not drop required ones. - When unsure of the surrounding context, widen
start_line/lineto include enough real lines from the diff rather than guessing at surrounding tokens. - For multi-line suggestions, set
start_lineandstart_sideto the first line, andlineandsideto the last line.
Output Format
Create review.json with this shape:
{
"verdict": "REJECT",
"body": "## Overview\n...\n\n## Concerns\n- ...\n\n## Verdict\nFound: 1 critical, 2 important, 3 suggestions\n\n**Request changes**",
"comments": [
{
"path": "path/to/file",
"line": 42,
"side": "RIGHT",
"start_line": 40,
"start_side": "RIGHT",
"body": "⚠️ [IMPORTANT] Short explanation\n\n```suggestion\nreplacement\n```"
}
]
}Field rules:
verdictis required and must be exactly the string"APPROVE"or"REJECT"(uppercase). Map your final recommendation as:ApproveorApprove with nits→"APPROVE";Request changes→"REJECT". Theverdictand the human-readable recommendation in top-levelbodymust agree.- Top-level
bodyis the GitHub review body and is required. Usebody, notsummary, for the review overview and final recommendation. commentsis required and must be an array. Use an empty array when there are no inline comments.pathmust be relative to the repository root.lineis required and must target the correct side.start_lineis optional and only for multi-line ranges. Whenstart_lineis present,start_sideis required and must be"LEFT"or"RIGHT".sidemust be"LEFT"or"RIGHT".
Body Requirements
The top-level body must include:
- A high-level overview of the PR.
- Important concerns and any untouched-code concerns that could not be commented inline.
- Issue counts in the format
Found: X critical, Y important, Z suggestions. - A final recommendation of
Approve,Approve with nits, orRequest changes. This recommendation must match the top-levelverdictfield (Approve/Approve with nits→"APPROVE";Request changes→"REJECT").
Pre-Verdict Audit
Before drafting the top-level body or choosing verdict, complete this audit — a holistic read-through of the diff is not sufficient.
- Comments: List every comment (doc comment or inline) the diff adds or changes, one by one with its file:line. For each one, check it individually against the repository's own commenting guidelines, whatever form those take — or, if the repository defines none, judge it against the commenting distribution of existing code in the project (density, tone, what existing comments explain vs. omit). Evaluate compliance independently of the comment's writing quality, technical accuracy, or how subtle/important the issue it describes is: none of those qualities excuses a violation of an applicable guideline or a clear mismatch with the codebase's own norms.
- Tests: Check every test the diff adds or changes against the repository's own testing guidelines, whatever form those take.
Final Checks
Before returning or uploading review.json:
- Fix invalid JSON if validation fails.
- Confirm line numbers match the annotated diff.
- Run the bundled validator against the exact annotated diff you reviewed:
If the script reports any invalid comments, fixpython3 .agents/skills/review-pr/scripts/validate_review_json.py --review-json review.json --diff pr_diff.txtreview.jsonand rerun it. Do not return or uploadreview.jsonuntil this validator passes. If the script path is not present at that exact location, locatevalidate_review_json.pyunder the loadedreview-prskill directory and run that copy with the same arguments. - Do not run
gh pr review,gh pr comment,gh api, or any other command that posts to GitHub.
Your only output is the final review.json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

