/agent-resources:review-prfrom agent-resources
Reviews pull requests with forensic, stage-aware analysis: reconstructs commit narrative, tests architectural premises, detects over-engineering, and produces a ready-to-post review comment.
Ships in agent-resources. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Forensic, stage-aware pull request review. Reconstructs the commit narrative, tests the PR's architectural premises against project reality, and produces a review comment the user can post directly.
Three core insights:
Before reading any code, establish context.
git remote -v
GitHub (primary path):
gh pr view <N> --json baseRefName,headRefName,title,body,commits,files,statusCheckRollup,reviews
Fallback (no gh CLI or non-GitHub remote):
git log --oneline <base-branch>..<pr-branch>
git diff --stat <base-branch>...<pr-branch>
Use the resolved base/head branch names for all subsequent commands.
Before forming opinions, read the project's own rules:
AGENTS.md — architecture, boundaries, "always do / never do" lists.cursor/rules/ — workspace rules that apply to all changesCONTRIBUTING.md, .github/PULL_REQUEST_TEMPLATE.md if presentIf none of these exist, infer conventions from the existing codebase: look at 2–3 files in the same directory as the PR's primary changes. Match naming, error handling patterns, test structure, and abstraction level already established.
These are the standards the PR should be measured against, not generic best practices.
git log <base-branch>..<pr-branch> --reverse --format="%h %s%n%n%b"
Extract what the PR claims to do. Do not treat claims as fact until the diff confirms them. Form your own judgment of scope and risk before reading existing review comments or the user's opinion.
If checks are failing, lead with that.
git diff --stat <base-branch>...<pr-branch>
Flag anything unexpected: utility files touched by a feature PR, large line counts unrelated to the stated goal, test files present or absent.
git log <base-branch>..<pr-branch> --reverse --oneline
| PR size | Approach |
|---|---|
| ≤15 commits, ≤30 files | Full reconstruction — read every commit's --stat, inspect files of interest |
| 16–40 commits or 31–80 files | Sample — read first commit, last commit, and any commit whose message signals a pivot ("revert", "actually", "try different approach"). Focus on the 5 highest-churn files. |
| >40 commits or >80 files | Shape-only — read --stat for all commits but only inspect the 3–5 files with the largest net diff. Note in findings that full reconstruction was not feasible. |
For each commit in scope, read git show <sha> --stat and inspect files of
interest.
Build a timeline: what was attempted first, were there course corrections, did the contributor fix their own mistakes within the branch?
Reversals and churn — commit N adds something, commit N+M removes it. Normal and healthy. Flag only if intermediate complexity survives in the final state.
Net diff is ground truth:
git diff <base-branch>...<pr-branch>
Individual commits explain why; the net diff is what lands.
For each file in the net diff:
| Category | Definition | Review actions |
|---|---|---|
| Primary | Directly serves the PR's stated goal | Read full file (Phase 4). Check correctness, edge cases, test coverage. Evaluate naming, error paths, and interaction with existing code. |
| Supporting | Necessary plumbing for primary changes | Verify it's the minimum change needed. Check: could the primary change work without this? Is the API surface minimal? |
| Opportunistic fix | Real bug fix discovered along the way | Confirm the bug exists on main. Check the fix is correct. Flag for separate PR if it complicates revert. |
| Scope creep | Unrelated improvement or refactor | Note in findings. Don't block merge unless it creates risk. Suggest splitting. |
| Churn | Added and reverted within the same PR | Run git diff <base>...<head> -- <file> to confirm net-zero. If not net-zero, reclassify. |
Shared utility changes get extra scrutiny: is the API change justified by more than one caller? Could the same result be achieved without modifying the shared surface?
For files categorized as Primary, read the full file on the PR branch:
git show <pr-branch>:<path/to/file>
Diffs show what changed but hide whether the result is coherent. Check for leftover artifacts, naming consistency, dead imports. Understanding the full file prevents forming architectural opinions from incomplete context — a diff that looks over-engineered may match patterns already established in the file.
For large files (>500 lines), read at minimum the 50 lines surrounding each change hunk plus the file's imports/exports.
Stop. Before evaluating any individual file or concern, think about the PR as a product decision. Most review failures happen here — the reviewer dives into file-level findings without first understanding what the change means for the product, its users, and its architecture. A review that catalogs twenty code issues but misses the one architectural tradeoff is a failed review.
State in one sentence what this PR actually improves for the product. Not what the code does — what the product gains. This becomes the opening line of your review. If you can't name the value, the PR may lack a clear purpose.
Every PR of substance makes decisions — about API surface, data flow, abstractions, constraints. Most are fine. A few are consequential. Find the consequential ones:
For each decision, ground your evaluation in the project's reality: its deploy model, its current traffic, its team size, its stage, its existing infra. Generic best practices are not arguments — "rate limiting is a best practice" is not a reason to add six rate limiters to an internal API with one caller.
Some changes have consequences beyond the code:
If a tradeoff exists, the review should surface it as a question, not an accusation: "Is it acceptable that X can no longer do Y? If so, let's document it."
Do not produce a flat list of file-level findings. Group related issues into 2–4 coherent themes, each grounded in the product reality from 5.2. A theme is a complete argument: what the PR does, why it doesn't fit, what to do instead.
Bad theme: "lib/ratelimit.ts — six rate limiters is too many."
Good theme: "Strip the rate limiting. Our usage pattern is one lookup per
user journey — there's nothing to rate-limit at current volume. Google's
own quota limits are our rate limiter. Ship without it and revisit when
usage data calls for it."
The difference: the good version names the actual usage pattern, explains why the infrastructure doesn't fit, and gives a clear action.
With the strategic assessment formed, now evaluate the details. The strategic themes from Phase 5 are your guide — details should support or refine those themes, not replace them.
For each piece of infrastructure the PR introduces, ask:
Common over-engineering patterns:
/v1/, schemaVersion) in monorepos that
deploy atomically| Project stage | Bias toward | Accept | Push back on |
|---|---|---|---|
| Early build | Simplicity, speed of iteration | Thin wrappers, direct calls, minimal abstraction | Infra for imagined scale, premature versioning |
| Growth | Reliability, observability | Caching, rate limiting, structured errors | Over-abstraction, speculative microservice splits |
| Scale | Performance, resilience | Multi-tier systems, circuit breakers, versioned APIs | Unnecessary rewrites of working code |
Read AGENTS.md and the repo structure to assess stage. If unclear, ask the
user.
Also evaluate:
Fold detail findings into the strategic themes from Phase 5. If a detail doesn't fit any theme, it goes into housekeeping.
If after Phases 1–6 no substantive concerns emerge (correct implementation, proportional scope, follows conventions, has tests), skip to Phase 8 with a short approval. Do not manufacture findings to justify the review's existence. A clean PR gets:
Present findings to the user, then expect corrections. The reviewer often lacks context the user has:
When the user corrects an assumption, update your assessment immediately. Drop the finding — don't hedge or footnote it.
This is iterative. The first pass surfaces raw findings; dialogue refines them into the actual review.
After collaborative refinement, produce a comment the user can post directly.
The review is a short essay, not a checklist. Structure it as themed paragraphs, each making a complete argument.
Opening paragraph: Name what the PR gets right and why it's valuable. This is not flattery — it tells the contributor you understand the intent and frames the subsequent asks as refinements, not rejections.
Themed paragraphs (2–4): Each paragraph is one coherent concern. Open with a clear directive ("Strip the rate limiting.", "Drop the versioning."), then explain why grounded in the project's actual reality (deploy model, usage pattern, existing infra), then state what to do instead. Don't split a single theme across multiple numbered items.
Tradeoff questions (if any): When the PR introduces a constraint that may or may not be acceptable, frame it as a question: "The workflow now requires X. Is that an acceptable tradeoff? If so, let's document it. If not, we need a fallback."
Housekeeping: A short bullet list for minor items (dead imports, missing doc updates, convention violations) that don't merit their own paragraph.
What should land: One paragraph specifying the subset to merge now and what to split into follow-up tickets.
Example structure:
Overall: [What the PR gets right and why it matters.]
[Theme 1 directive.] [Why, grounded in project reality.] [What to do.]
[Theme 2 directive.] [Why.] [What to do.]
[Tradeoff question, if any.]
Housekeeping:
- [Item]
- [Item]
What I'd like to land: [Specific subset. What to defer.]
One of:
What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/advisorActivate rigorous, no-nonsense advisory mode for deep analysis, research, critical review, or honest assessment. Use when the user says "advise", "advise me", "give me your honest take", "don't sugarcoat", "be brutally honest", "rigorous mode", "devil's advocate", "second opinion", "challenge this", "stress-test this", "poke holes", "what am I missing", or any variation of wanting unfiltered expert analysis. Also use when the user asks a complex research question, requests a critical review of a plan or architecture, or wants a decision evaluated with full intellectual honesty rather than encouragement./babysit-prBabysit review comments on the current branch's pull request. Bugbot comes first: wait for its review, fix each valid finding, commit, and push. Handle every other open comment too, from human reviewers and other bots. Repeat for up to three rounds, or until nothing new is open. Use when the user says "babysit PR", "babysit this PR", "wait for Bugbot", "address review comments", "address Bugbot comments", "loop until Bugbot is clean", or wants open PR feedback fixed without merging./cleanup-hardenRuns a cleanup and hardening pass on an application or website covering security fixes, DRY consolidation, orphan and dead-code removal, doc drift, dependency audit, error handling, config validation, performance, and repo hygiene, without changing user-facing behavior. Use when the user asks to clean up, prune, harden, audit, tidy, or de-cruft a codebase, remove dead code, fix doc drift, or do a security pass.Generated from the plugin's indexed repository (jcottam/agent-resources) — no native marketplace selected
npx claudepluginhub p/jcottam-agent-resourcesOther plugins' skills for the same job