review-pr
Skill6 starsChanged 25 days agoMITView on GitHub
Review a PocketPal pull request, branch, or review worktree. Use for external PR reviews, requested code-review passes, risk classification, review-map creation, per-lens reviewer dispatch, verification, and final review output.
185 other projects use a version of this.
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 diagnose-ci-failures, docs-loop and 10 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.
zerx-labSkilldiagnose-ci-failures
Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.
Also in 3 projects that use this
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 · 0
None found.
Wrote their own version · 185
- 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
175 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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- benchSkill
- figma-implementSkill
- ios-routerSkill
- memory-profileSkill
- pmSkill
- review-l10nSkill
- run-e2eSkill
- run-pr-e2eSkill
- start-taskSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 178 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
If essential target information can't be found locally or on GitHub, stop and ask for it.
- Distinctive: line 45
If an expected worktree path is missing but git worktree list has a stale entry, never remove it with raw git or filesystem commands.
- Distinctive: line 49
Read only what applies:
- Distinctive: line 76
Keep findings out of the map unless an obvious blocker changes review planning.
- Distinctive: line 103
If a reviewer returns output without writing it, write it verbatim to the artifact path before synthesis.
- Very specific: line 130
Read all reviewer artifacts and verification.md, then write final.md in the human-facing shape (docs/standards/review-output.md): the …
“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
Orchestrate a code review (not implementation) of a PR number, branch ref, or worktree path: /review-pr <pr-number | branch-ref | worktree-path>.
docs/standards/code-review.md owns risk, severity, confidence, refutation, verdict, and output; docs/standards/review-lenses.md the lenses. Read both before judging. The lead maps, dispatches pocketpal-reviewer per lens set, and synthesizes. repos/pocketpal-ai/ is read-only: use worktrees.
Inputs To Resolve
Before classification: target (PR number, branch ref, or worktree path); review ID (PR-<number>, or a stable name from the branch/worktree); worktree path under worktrees/; base and head refs; PR metadata, changed files, diff, linked issue, and acceptance criteria when available; the current round's folder or the next new one.
If essential target information can't be found locally or on GitHub, stop and ask for it.
Readiness
For a PR produced by this pipeline (a story exists for its branch), run tools/pr-gates.sh <PR> first. ci PEND (exit 4) means wait and rerun. Any gate FAIL (exit 1: ci or hygiene) is NOT_READY: reply NOT_READY with the gate output and stop without creating a round folder. A standalone review the user asked for (an external PR, a branch) proceeds and records the gate output in verification.md.
Worktree Setup
For PR targets, fetch the PR head into refs/remotes/pr/<n> (never into pr-<n>: that branch may be checked out in the worktree, and git refuses), then create or reuse the review worktree at that head.
ROOT="$(git rev-parse --show-toplevel)"
MAIN_REPO="$ROOT/repos/pocketpal-ai"
PR_NUMBER="{PR_NUMBER}"
REVIEW_ID="PR-${PR_NUMBER}"
WORKTREE_PATH="$ROOT/worktrees/${REVIEW_ID}"
PR_REF="refs/remotes/pr/${PR_NUMBER}"
PR_INFO=$(gh pr view "${PR_NUMBER}" --repo a-ghorbani/pocketpal-ai --json title,body,author,files,additions,deletions,commits,url,headRefName,headRefOid)
HEAD_SHA=$(jq -r .headRefOid <<<"$PR_INFO")
git -C "$MAIN_REPO" fetch origin "+pull/${PR_NUMBER}/head:${PR_REF}"
[ -d "${WORKTREE_PATH}" ] || "$ROOT/tools/create-worktree.sh" "${REVIEW_ID}" --branch "pr-${PR_NUMBER}" --ref "${PR_REF}"
"$ROOT/tools/sync-worktree-config.sh" "${WORKTREE_PATH}"The worktree is also the PR-fix worktree, so move it to the PR head by fast-forward only: stop and report when it has a dirty tree or commits not on ${PR_REF}; otherwise git -C "${WORKTREE_PATH}" merge --ff-only "${PR_REF}". Confirm git -C "${WORKTREE_PATH}" rev-parse HEAD equals HEAD_SHA, and record that SHA as the reviewed revision in review-map.md.
If an expected worktree path is missing but git worktree list has a stale entry, never remove it with raw git or filesystem commands. Create or reuse an allowed worktree per repo instructions, or report the blocker.
Context To Read
Read only what applies:
context/pocketpal-overview.md(product, domain),docs/standards/architecture.md(boundaries, runtime surfaces, data flow),context/patterns.md(implementation and test conventions).docs/workflows/visual-capture.mdwhen UI screenshots or visual evidence matter.- The story's
evidence.md,decisions.md, andwhat.mdfor pipeline changes; pass their paths to every reviewer (use: standard's Canonical Inputs). - The touched flow docs (
context/architecture/<flow>.md: the story'sARCHITECTURE_DOCS, else the README index rows matching the changed files), passed to the reviewer holding the Architecture lens. - Lessons for the surfaces the diff touches (
tools/context search <terms>), passed to the reviewers whose lenses they concern. - Earlier rounds'
final.mdfor this target: report a finding already fixed once and now back as a design problem, not another fix.
Review Artifact Folder
Write artifacts to workflows/reviews/<TARGET_ID>/round-<N>/, where N is the highest existing round-<k> for this TARGET_ID plus 1, unless explicitly continuing an in-progress round. The max-2-rounds cap and escalation belong to the caller (the /start-task loop); a standalone run does one round, states its number, and enforces no cap.
Required files: review-map.md, one reviewer-<lens-set>.md per reviewer (e.g. reviewer-all.md, reviewer-security.md, reviewer-correctness-tests.md), verification.md, final.md.
A missing required reviewer artifact means review_complete: no and lens_subreviews: BLOCKED.
Review Map
The lead writes review-map.md before dispatch; it orients, it is no verdict. Include:
- target metadata: target, base ref, reviewed head SHA (
headRefOid), worktree path, story/PR links; - change areas: changed files grouped by area, key files, what each does, cross-cutting concerns;
- runtime and data-flow notes: upstream callers, downstream effects; state, data, network, persistence, native boundaries; async, streaming, lifecycle, retry paths; hidden coupling between changed files; touched flow docs; a diagram only when it clarifies; each claim confirmed in code;
- requirements → files: each story/PR/issue/acceptance-criteria requirement, tied to its text, mapped to files, verification, and lens; missing or ambiguous ones are review risks;
- risk classification, lenses that apply (N/A ones with a reason), the reviewer split, file focus per reviewer, verification required by policy.
Keep findings out of the map unless an obvious blocker changes review planning.
Risk Classification and Dispatch
High risk per the standard's Working Method (a request for a deep or lens-based review counts too).
- Low risk:
lens_subreviews: NOT_REQUIRED; onepocketpal-reviewerwithLENSES: all(artifactreviewer-all.md). - High risk: parallel
pocketpal-reviewers with one or a few lenses each, covering every lens that applies exactly once. Each high-risk surface in the map gets its lens a reviewer of its own (trust boundary → Security, schema/persistence → Data, perf-sensitive path → Performance, platform UI → Platform); the other applicable lenses are grouped by shared areas (e.g. Correctness + Tests + Local invariants).
Subreview Gate
Mandatory for high-risk reviews: run the read-only lens subreviews before the final review. If a required reviewer cannot run, produce no complete final review: mark review_complete: no and lens_subreviews: BLOCKED.
Delegation shape:
Use pocketpal-reviewer.
LENSES: <lens list | all>
Target: <target>
Worktree: <review worktree>
Base ref: <base SHA/ref>
Head ref: <head SHA/ref>
Review map: workflows/reviews/<TARGET_ID>/round-<N>/review-map.md
Output artifact: workflows/reviews/<TARGET_ID>/round-<N>/reviewer-<lens-set>.md
If a reviewer returns output without writing it, write it verbatim to the artifact path before synthesis. The final review is built from the reviewer artifacts, each in this shape:
# Review (<lenses>): <TARGET_ID> Round <N>
status: FINDINGS | NOTHING_FOUND
## Findings
### <ID>: <Title>
severity: BLOCKER | CONCERN | SUGGESTION
lens: Correctness | Architecture | Maintainability (incl. comment load) | Tests | Security | Data / Migration | Performance/Resources | UX / Accessibility | Platform | Local invariants
confidence: high | med | low
path: relative/path.ts
line: 123
impact: One sentence.
evidence: Short quote or concrete code reference.
fix: One sentence.Verification
Run feasible verification from the app worktree and write the status to verification.md. Run yarn install in the worktree when node_modules or jest is missing, and in e2e/ before E2E commands. Native dependency or code changes require pod install, an iOS build, and an Android build; missing them is blocking unless the user explicitly changes the requirement.
Final Synthesis
Read all reviewer artifacts and verification.md, then write final.md in the human-facing shape (docs/standards/review-output.md): the team-facing, local synthesis record (Publish posts the public form). Before writing:
- Confirm every required reviewer artifact exists, or mark the review incomplete.
- Merge duplicate findings.
- Normalize each finding's severity and confidence against the standard.
- Refute each BLOCKER/CONCERN (standard's Adversarial verification) as a reviewer independent of the one that raised it; record
refutation: standsor drop/downgrade withrefutation: withdrawn — <reason>. - Apply the mechanical verification gate: no
APPROVE/review_complete: yesoverNOT_RUNchecks. - Include short synthesis notes only when they matter, such as unavailable reviewers, merged duplicates, missing reviewer artifacts, or verification gaps.
Final Response
Respond from final.md, team-shareable: lens_subreviews: COMPLETED | BLOCKED | NOT_REQUIRED (COMPLETED for a complete high-risk review), review_complete: no when required subreviews did not complete, findings grouped by severity, verification status, residual risks, and open questions.
Publish
For a PR target, post the verdict to the PR with tools/ghb pr review <n> --comment and a body file (always --comment: the bot authors pipeline PRs, and GitHub refuses a review that requests changes on the author's own PR):
- verdict, reviewed head SHA, and verification status;
- BLOCKER/CONCERN findings, one line each: severity,
path:line, the fix; SUGGESTIONs, one line each, under aFollow-upsheading (the PR's follow-ups; the operator may file them);- ends with the signature line from
AGENTS.md.
Public references only (AGENTS.md, Public artifacts): no round numbers, review or story paths, task IDs, or story anchors. Keep it short.
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.

