agentleFS
notum-cznotum-cz/strapi-next-monorepo-starter/.claude/skills/review-pr/SKILL.md

review-pr

Skill316 starsChanged 5 months agoMITView on GitHub

Use when the user wants a thorough review of a GitHub PR or a local feature branch's diff before merge — e.g. "review PR", "review pull request", "review this branch", "review the diff", "feature review", "/review-pr". Accepts a PR number/URL or runs against the current branch.

  • Installs packages

185 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnose-ci-failures, review-delta 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-labSkill

    diagnose-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

  • n24q02mSkill

    review-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

  • GeiserXSkill

    docs-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

  • GeiserXSkill

    full-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

  • n24q02mSkill

    build-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

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Check out into an isolated worktree: if scripts/worktree/create.sh exists → bash scripts/worktree/create.sh review/pr-<num> <baseRefName> …

    line 32
  2. Very specific:

    Build gate (required): If the diff touches apps/ui/, apps/strapi/, or any packages/, the affected app(s) MUST build — typecheck doesn't …

    line 65
  3. Distinctive:

    Never silently skip when app/package code changed.

    line 75
  4. Very specific:

    When the diff touches apps/ui/, the UX / types / correctness reviewers apply vercel-react-best-practices and next-best-practices as the …

    line 96
  5. Distinctive:

    Ask before posting; default is print only.

    line 124
  6. Very specific:

    Never gh pr merge — the author/maintainer merges.

    line 134

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review Pull Request

Review a change before merge — run the build/test gates, dispatch focused review subagents, then produce a verdict with concrete fixes.

Two modes, two audiences:

ModeTriggerUse it toPosts back?
Localno argumentself-review your own branch before you push / open the PRno — prints only
PRPR number or URLreview a teammate's (or your own) open PRoptional — comment / approve on GitHub

PR mode is GitHub-only (it uses gh). On GitLab/Bitbucket/other hosts, check the branch out and use local mode — it reviews the same diff host-agnostically; only posting is skipped.

Be thorough but terse. Surface real issues; skip nits already handled by formatters / linters / commitlint. This skill reviews only — it never pushes fixes or merges.

Phase 1 — Set up the review workspace

PR mode

  1. Resolve the PR number from $ARGUMENTS; gh pr view <num> --json number,title,body,headRefName,baseRefName,url,state,isDraft,mergeable.
  2. Check out into an isolated worktree: if scripts/worktree/create.sh exists → bash scripts/worktree/create.sh review/pr-<num> <baseRefName> then gh pr checkout <num> inside it; else → git fetch origin pull/<num>/head:review/pr-<num> + git worktree add ../.worktrees/review-pr-<num> review/pr-<num>.
  3. From here, all commands run in the review worktree.

Local mode

Confirm the current branch isn't dev / stage / main (abort if it is) and use the current worktree as-is. Base defaults to dev (fall back to main); verify it exists.

Phase 2 — Gather context

In parallel: git log <base>..HEAD --oneline, git diff <base>...HEAD --stat, git diff <base>...HEAD (full). PR mode also: gh pr view <num> --comments + gh pr diff <num> (sanity-check vs local fetch).

Map changed files to surfaces:

Path prefixSurface
apps/strapi/src/api/**, apps/strapi/src/components/**Strapi schema / API
apps/ui/src/components/**, apps/ui/src/app/**UI / Next.js
qa/tests/playwright/**E2E tests
apps/strapi/tests/**, apps/ui/src/**/*.test.tsUnit / integration tests
package.json, pnpm-lock.yamlDeps
.github/**, scripts/**, turbo.jsonTooling / CI

Phase 3 — Validate the build

From the review worktree, in parallel where independent (command + suite reference: apps/docs/docs/reference/commands.md, apps/docs/docs/reference/testing/overview.md):

pnpm install --frozen-lockfile --prefer-offline
pnpm typecheck
pnpm lint
pnpm test:ci

Build gate (required). If the diff touches apps/ui/**, apps/strapi/**, or any packages/**, the affected app(s) MUST build — typecheck doesn't catch Next.js route collection, Strapi schema compile, or bundler errors. Use pnpm turbo build --filter=<pkg> (not pnpm --filter … build) so workspace deps build in topo order.

Diff touchesCommand
only apps/ui/**pnpm turbo build --filter=@repo/ui
only apps/strapi/**pnpm turbo build --filter=@repo/strapi
both appsboth filters in parallel, or pnpm build
any packages/**pnpm build — safer than guessing consumers
only qa/**, .github/**, docs onlyskip build; note "build skipped — no app/package code changed"

Never silently skip when app/package code changed. If a gate fails, capture it verbatim and stop before Phase 4 — a broken build invalidates downstream review.

If the Strapi schema changed, run strapi-schema-check (skill) on the diff. If qa/tests/playwright/** is relevant to the change, run the matching suite (e2e for UI/routing, visual for new surfaces — never update snapshots, axe for a11y, seo for meta/head). Capture failures; don't fix them.

Phase 4 — Dispatch parallel review subagents

Spawn these with the Agent tool in a single message, all independent. Each gets the diff, base + head SHA, and the changed-surface map, and reports back ≤ 200 words.

subagent_type lists a preferred specialized agent (pr-review-toolkit plugin) then an always-available fallback — use the fallback when the plugin isn't installed; don't fail the review over it.

Subagentsubagent_type (preferred → fallback)Focus
Correctness & logicpr-review-toolkit:code-reviewer → feature-dev:code-reviewerbugs, off-by-one, null/undef, async errors
Silent failurespr-review-toolkit:silent-failure-hunter → general-purposeswallowed errors, fallback abuse, suppressed throws
Typesgeneral-purposeTS soundness, any leaks, narrowing gaps
Testspr-review-toolkit:pr-test-analyzer → general-purposecoverage of new behavior, missing edge cases
Comments / docspr-review-toolkit:comment-analyzer → general-purposeonly if non-trivial new comments / docstrings
Securitygeneral-purposesecrets, SSRF, SQLi, auth bypass, XSS, env-var leaks
Strapi-specificgeneral-purposeonly if schema/API touched — populate, lifecycle, perms
UXgeneral-purposeonly if UI touched — a11y, loading/error states, dark mode

When the diff touches apps/ui/**, the UX / types / correctness reviewers apply vercel-react-best-practices and next-best-practices as the React/Next.js rubric (and frontend-design for visual/UX surfaces) — these skills are vendored in .agents/skills/. They supply the standards; this skill still owns the process and verdict.

Dispatch the Explore agent for any read-only spelunking, so it doesn't pollute the main context.

Phase 5 — Consolidate the report

# Review — <PR title or branch name>

**Verdict:** ✅ ship / ⚠️ ship with follow-ups / ❌ block

## Build & tests
- typecheck / lint / build / unit / playwright / strapi-schema: pass | fail (<n>)

## Blocking issues
1. <file:line> — <problem> — <fix>

## Non-blocking
- <file:line> — <suggestion>

## Out of scope (mention, don't block)
- <noticed but not in this PR's scope>

Be concrete: every issue has file:line + the actual fix or test that would catch it. No hand-wavy "consider refactoring".

Phase 6 — Post (GitHub PR mode only)

Ask before posting; default is print only. If approved:

gh pr review <num> --comment --body-file <tmpfile>

--request-changes only for ❌; --approve only for ✅ and when the user explicitly says so. In local mode or on non-GitHub hosts there's nothing to post to — just print the report.

Notes

  • Never gh pr merge — the author/maintainer merges.
  • For huge diffs (> ~2000 lines), ask the user to scope ("review which files first?") rather than dispatching blindly.
  • Asana / Linear / Azure references in a PR body are out of scope — ignore them.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.