/agent-skills:pr-reviewfrom agent-skills
Review a pull request or a local branch with evidence. First challenges the premise: is the problem real, does the change treat its cause, would a smaller design or an existing feature do. Writes down what a complete change would include before reading the diff, then lists what is missing. Finds docs and flags that still mention what the change removed. For fixes, reproduce the problem on the target branch and prove the change fixes it. For features, check the change answers a roadmap goal, or start a feedback loop on its value. Runs the project's checks locally and weighs simplicity and cost. Posts non-blocking comment reviews and hands approval to the maintainer. Use this skill whenever the user asks to review a PR, look at a pull request, check a branch before merging, self-review work before opening a PR, or decide whether a PR can be approved, even if they only paste a PR number or link.
Ships in agent-skills. 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.
Read when SKILL.md points to them.
A review answers four questions with evidence, not opinion:
references/premise.md.Question 0 comes first. A review that only lists line-level findings has not done its job: if the approach is wrong, every nit on its lines is wasted work for the author.
Then it reports without blocking anyone. Feedback goes out as comments, never as "request changes". Approval goes to the maintainer, never from the reviewer.
gh.pr_info.py --local --base <ref> --head <ref> and worktrees.py prepare --base <ref> --head <ref>. Nothing is posted in this mode; findings go back to the caller.All scripts are in scripts/ and need only Python 3 and git (plus gh for GitHub PRs).
python3 <skill>/scripts/pr_info.py 42 # PR facts, type hint, maintainer, CI, roadmap nodes
python3 <skill>/scripts/pr_info.py --local --base main --head fix/x
python3 <skill>/scripts/pr_info.py 42 --blind # the same, without the changed files
python3 <skill>/scripts/branch_policy.py --type feature --base main # does this kind of change belong on that base?
python3 <skill>/scripts/worktrees.py prepare --pr 42 # base and head side by side in .git/review-worktrees/
python3 <skill>/scripts/repro.py <base> <head> --copy <test> -- <command> # fails on base, passes on head?
python3 <skill>/scripts/size_diff.py <base> <head> --glob 'dist/**/*.js' # build output size, raw and gzip
python3 <skill>/scripts/surface.py --base <base> --head <head> # mentions outside the diff of what it removed or changed
python3 <skill>/scripts/worktrees.py cleanup pr-42
Work in the review worktrees, never in the user's own checkout. The user may be working there, and the review must not change their files.
Run pr_info.py --blind. Read the title, body, linked issues and the roadmap brief, but not the diff or the changed files yet (step 2b). Decide the type from the claim: fix, feature, or other (refactor, docs, dependency update, chore). The type hint is a starting point; the diff confirms it in step 3. A PR that does two things is two reviews, and the comment should say it would be easier to merge as two PRs.
Check the base. pr_info.py reports expected_base and base_ok from the repo's branch policy (branch_policy.py): trunk-based repos send everything to the default branch, while gitflow-style repos send features and fixes to dev (or develop), hotfixes to the default branch, and promote dev -> next -> main. A PR against the wrong base is a blocking finding, because merging it would ship work to the wrong stage. The fix is quick: gh pr edit <n> --base <expected>. A hotfix against the default branch also needs back-merge PRs into the other integration branches; check they exist or are planned.
Check the repo's visibility. On a private repo, never trigger, re-run or wait on GitHub Actions: CI minutes are billed. Run the checks locally instead. Reading existing check results with gh pr checks is fine.
worktrees.py prepare puts the base (the merge base the PR was written against) and the head side by side. Use --tip to test against the current tip of the base branch when the base has moved a lot since the PR was opened.
Both worktrees get the gitignored files that .worktreeinclude names (such as .env), copied from the current checkout and listed under copied. A check that fails in both worktrees for lack of a gitignored file is not the PR's fault. Report the missing file and suggest adding its pattern to .worktreeinclude.
Install dependencies in each worktree only when a step needs to run code (scoped-checks' checks.py --install). Installs are slow, so do it once per worktree.
Read references/blind-review.md and references/premise.md. Before you open the diff, write expectations.md in the notes folder from worktrees.py prepare. Read only the claim (title, body, issue, brief and its acceptance criteria) and the base worktree's docs, examples and public API for that area. Start it with a ## Premise section. Write the goal in one sentence, whether the problem is shown to be real, and where it comes from in the base code. List the options (do nothing, use what exists, the smallest change, a change at another layer) and pick one. Search the base for existing code that already does the job before you write that none exists. Then list what a complete change would include: behavior, edge cases, callers, public surface, docs, tests, release notes, and what it should not touch. Do not edit the file after you read the diff.
When a caller gives you the claim first and the branch later, write the file and reply before asking for the branch.
Now read the diff (gh pr diff or git diff <merge-base>..<head>). Before you judge any line, compare the PR's approach with your Premise pick (see "Comparing your design with the PR's" in references/premise.md). A shown symptom-only fix, an unproven problem, or an existing feature that does the same job is blocking. A smaller design you can sketch is should-fix. A goal or cost only the maintainer can decide is a question for them. Then mark each expectation met, missing or not needed. List what the diff does that no expectation covers (see "Comparing the diff against them" in references/blind-review.md). Run surface.py --base <base> --head <head> and check each stale or changed mention. A missing acceptance criterion is blocking. A missing doc, changeset or test for changed behavior, or a stale mention in docs, is a should-fix finding.
When the risk rating (step 5) is medium or high, or the change touches the public API or its docs, have the docs tested from outside: a new agent that sees only the docs and public signatures writes and runs tests (see "Docs tests" in references/blind-review.md). You have read the code, so do not write them yourself. A subagent reviewer reports "docs tests needed" to its caller instead.
Read references/evaluation.md for the full criteria and how to measure cost.
Fix.
repro.py base head --copy <that test> -- <command to run it>. If the PR adds no test, write the smallest reproduction you can (a test file or a script in the review worktree, not committed) and run it the same way.proven: fails on base, passes on head. The fix works for that case.not-reproduced: the base passes too. The PR does not show the problem. Do not recommend approval. Before writing the comment, spend a few minutes looking for inputs that do produce the reported symptom (see "When the problem does not reproduce" in references/evaluation.md). A found cause turns the comment from "please send a reproduction" into "the real cause is X, shown by this input".not-fixed: the head fails too. The fix does not work.inconclusive: the command could not run. Fix the setup and try again before judging.repro.py can still be at the wrong place. Examples: a retry around a race, a cache over a call made in a loop, a null check where the null should never exist. proven only means the reported case is gone.Feature.
pr_info.py lists nodes whose brief the body links to, or whose owned paths cover the changed files.verify command if it has one. Check the diff stays inside the node's owned paths. Then evaluate simplicity and cost as for any change.references/features.md) and lean toward feedback: the comment proposes it as a roadmap addition, with a suggested priority, size and the questions the maintainer must answer. Do not recommend approval until the feature has a node or the maintainer accepts it in the thread. This is the same loop the parallel-roadmap skill uses for ideas that arrive mid-roadmap.Other. Refactors must not change behavior: run the tests on both sides and compare. Dependency updates need the changelog read for breaking changes. Docs need to match the code they describe.
Run python3 <skills>/scoped-checks/scripts/checks.py <head> --run --install --changed <base>. It runs each check on the PR's changed files only (see the scoped-checks skill), and in full when a config file changed. Run without --changed only when no CI runs the full set before merge (a private repo, or no check workflow) and the change touches a module other packages import. Every detected check must pass: lint, format, typecheck, build, tests. When a check also fails on the base, say so; it is not this PR's fault, but it still blocks a clean merge.
On a public repo where CI already ran, gh pr checks results count, but still run the checks locally when CI is missing, failed for an unclear reason, or does not cover a kind of check.
Measure what can be measured, and give numbers: build size with size_diff.py, benchmarks when the repo has them and the change touches a hot path, new dependencies with their size and license. Then judge simplicity: is there a smaller change that does the same? Rate the risk with the rubric under "Risk" in references/evaluation.md, and check the PR's own Risk block against it.
Sort every finding into one of three kinds. Premise findings are sorted the same way and go first:
When a premise finding is blocking, keep the rest short: list only the problems that would survive a redesign, and drop nits.
Bugs you find on the base that the PR did not cause and does not touch are not findings against the PR. Mention them under a separate heading ("Found on <base>, not caused by this PR") and suggest a separate fix PR against the base branch, so the fix can ship on its own and this PR is not held up. A vulnerability on the base never goes in the review. Report it only to the user, who fixes it with the security-fix skill.
Then:
references/review-format.md.Reviews are non-blocking: post with gh pr review <n> --comment --body-file <file>, never with --request-changes, and never --approve.
Before posting anything to GitHub, show the user the review text and ask, unless the user already said to post (for example "review and post", or a standing instruction). Posting is visible to others and cannot be fully undone.
A roadmap with an auto merge policy lets the orchestrator merge clean PRs without the maintainer; the reviewer's verdict is one of its inputs (--review-clean means no blocking and no should-fix findings). The reviewer still never approves. Otherwise, the approval goes to the maintainer that pr_info.py reports:
gh pr review <n> --approve), and let them run it or tell you to.In local mode, post nothing. Return the findings and the verdict to the caller.
The reviewer only removes its own review worktrees. It never deletes the PR's branch, locally or on the remote: that belongs to the author, who prunes it after the merge (the pr-author skill does this).
Run worktrees.py cleanup --all. It also removes the notes folders, with the expectations and any docs tests. Copy its output line into the final summary as it is printed (cleanup: no review worktrees left). If it lists worktrees that are still registered, say so instead of reporting the cleanup as done.
End with a short summary in the chat:
PR #42 fix: sum skipped the first item
Verdict: ready for maintainer approval | not approvable yet | needs a decision (feature not on the roadmap)
Approach: matches my pick (fix at the cause in src/sum.js) | differs: <option and why>
Proof: src/sum.test.js fails on main (exit 1), passes on the branch (exit 0)
Checks: lint pass, typecheck pass, build pass, test pass (local)
Expectations: 18 met, 2 missing (docs/cli.md, empty input), 3 not needed
Surface: 1 stale mention (README.md:42 parseDate), changeset present
Cost: +0.1kB gzip, no new dependencies
Risk: low (PR says low), 2 caller files, reverts alone
Findings: 0 blocking, 1 should fix, 2 nits
Posted: comment review (link) | not posted, waiting for your go-ahead
cleanup: no review worktrees left
Write all review text by the plain-writing rules if that skill is installed: short sentences, exact paths and numbers, no metaphors.
evals/feature-off-roadmap/case.yaml (opens in a new tab)evals/feature-off-roadmap/files/setup.sh (opens in a new tab)evals/feature-off-roadmap/graders/01-not-on-roadmap.md (opens in a new tab)evals/feature-off-roadmap/graders/02-proposal.md (opens in a new tab)evals/feature-off-roadmap/graders/03-no-approval.md (opens in a new tab)evals/feature-off-roadmap/graders/04-checks.md (opens in a new tab)evals/feature-off-roadmap/graders/09-worktrees-cleaned.md (opens in a new tab)evals/feature-off-roadmap/place-files.sh (opens in a new tab)evals/feature-off-roadmap/prompt.md (opens in a new tab)evals/feature-on-roadmap-incomplete/case.yaml (opens in a new tab)evals/feature-on-roadmap-incomplete/files/setup.sh (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/01-node-matched.md (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/02-missing-criterion.md (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/03-outside-owns.md (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/04-no-approval.md (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/05-verify-run.md (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/06-resolve-steps.md (opens in a new tab)evals/feature-on-roadmap-incomplete/graders/09-worktrees-cleaned.md (opens in a new tab)evals/feature-on-roadmap-incomplete/place-files.sh (opens in a new tab)evals/feature-on-roadmap-incomplete/prompt.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lxsmnsyc/agent-skills --plugin agent-skills17 skills in this plugin
/changesetsWrite the changeset for a change in a repo that releases with changesets (a `.changeset/` folder exists). The bump level follows one question, whether the thing existed before: patch for changed behavior, minor for something new, major only with the maintainer's approval. Use this skill whenever finishing a change, opening a pull request or reviewing one in such a repo, even when nobody asks for a changeset, and when the user asks about bump levels or changelog entries./docs-siteMethod for planning, writing and maintaining a documentation site for a library, CLI, framework, API or app. Splits the site by what the reader needs (learn, do a task, understand, look up) into getting started, guides, concepts and reference, plus examples, troubleshooting, migration and a glossary. Gives each page type a fixed template, including the feature page (what it is, why, how it works, usage, options, limits, related) and the API reference entry. Covers navigation, code examples that run, keeping docs in step with the code, versioned docs and pages agents can read. Includes page templates, a checker script for page structure, links, orphan pages and code fences, and a review checklist. Use this skill whenever writing, restructuring, auditing or reviewing documentation, a docs site, a docs page, a README that has grown into docs, API reference, a getting started page, a migration guide or the docs part of the website/ folder, even if the user does not say "docs site". Load plain-writing with it./fewer-questionsDecide whether a question to the user is worth asking before asking it. Skip a question whose options give the answer away, such as one real option next to declines or weaker copies. Skip a question where "no" leaves nothing to do, such as "Should I proceed?" or "Is the plan ready?", and do the work the user asked for. Ask only when each answer leads to different work, or before an action that is hard to undo, reaches outside the machine or costs money. Includes an optional hook that blocks yes-or-no and proceed questions in AskUserQuestion. Use this skill whenever about to ask the user a question, call AskUserQuestion, offer options, or end a turn with "should I...?", "do you want me to...?" or "let me know if...", even if the user never says "questions"./goal-debateWeigh a goal against what it costs before anyone plans or builds it. A proponent agent proposes the idea and expands it, an opponent agent attacks its weak points and costs, and the orchestrator judges each claim with evidence until the two settle on the structure with the best value for its cost. Costs are weighed on three axes, device capability (storage, RAM, compute), time to deliver and token spend, plus any axis the plan needs. Prior art (papers, public repos, the lab's past attempts) counts as evidence, small capped proofs settle feasibility claims, and research goals end with a hypothesis and success threshold fixed before any run. Unknowns that cannot be measured go to the user as questions. It also weighs an existing roadmap that grows faster than it ships, and proposes which nodes to drop, park or merge. Use this skill when the user wants to evaluate, challenge, debate or sanity-check a goal, idea, proposal, ADR or roadmap, wants to cut scope, asks whether something is worth building or researching, whether it has been done before, or whether it is feasible on their machine, in their time or within a token budget, or before parallel-roadmap plans a large or costly goal, even if they never say "debate"./issue-authorWrite and open GitHub issues that a maintainer can act on, such as bug reports, feature requests and diagnosis handoffs, in the user's repo or someone else's. Searches open and closed issues and pull requests for duplicates first, follows the repo's own issue templates and labels, reproduces a bug on the latest release and on every release line the repo still maintains, and lists which lines it affects. Opens no issue for a bug that shows only in unmaintained versions, and none for a security problem, which goes to a private report or the security-fix skill instead. Use this skill whenever the user asks to open, file, write, draft or report an issue or a bug, when root-cause returns a fix-large verdict, or when pr-author finds a bug too large for a fix PR, even if they do not say "issue"./landing-pageRules for landing pages, homepages and marketing sites of any product, such as a library, CLI, web app, mobile app, API or physical product. The page shows a demo of the product or its effect, with an animated or interactive hero visual chosen from designs the author reviews. It sells the benefit and the difference from competitors instead of describing features. It keeps text short and lets visuals carry the page. It picks the selling points the visitor cares about, uses playful animation or interaction that shows what the product does, and shows who uses it when that proof is strong enough. Includes steps for each kind of product, a word count script and a review checklist. Use this skill whenever designing, writing, building or reviewing a landing page, product homepage, marketing site, the website/ folder of a repo, or a hero section, even if the user does not say "landing page". Load ui-style with it. This skill overrides only the ui-style rule against idle and first-paint animation. Every other ui-style rule still applies.Other plugins' skills for the same job