.agents/skills/pr-review/SKILL.md
Review the code, not the PR pitch. Investigate the changed behavior, run the relevant checks, and write a short decision-ready report.
Read references/report.md before writing a report.
If the user names a PR, review that open PR. Otherwise:
Record the PR URL, base SHA, head SHA, changed files, current merge state, and current checks.
Determine what the PR is trying to change from:
Read every explicitly linked issue. Verify its reported behavior against the current base when practical.
A linked issue is not required. If there is no issue, state that fact briefly and derive the testable problem from the PR claim and changed behavior. Never fail a technically valid PR merely because no issue was filed.
Establish expected behavior from the repository, an existing public contract, a reproduced user-visible behavior, or official documentation. Do not use the author's wording alone as proof.
Read all changed files and their direct consumers. Identify the smallest public behavior affected by each change. Check for unrelated edits, unsafe code, dependency changes, weakened tests, API changes, and generated-file mismatches.
Materialize clean source copies for the exact base and head SHAs in an OS-temporary directory without Git metadata. Use the same environment and inputs for both.
Run a focused independent check that answers:
Use the most direct proof available:
Run broader tests only when the changed surface reaches them. Green CI supports the result but does not replace the focused check. PR-added tests may be used, but do not rely on them as the only proof.
A separate test-merge candidate is required only when the base moved after the PR head, GitHub reports a conflict or uncertain merge state, or the change interacts with recent base changes. Do not create a blocker from an unavailable test-merge SHA when exact base and head testing already proves an isolated change.
If a required check cannot run, first decide whether another direct check proves the same behavior. Record it as a concern only when the missing check is necessary to resolve a concrete question about the changed code.
Look for concrete ways the changed lines could affect existing supported usage. Trace each scenario from:
changed code → real consumer or public contract → failure condition.
Test each scenario when practical. Report only scenarios with that trace. Never list generic possibilities that could apply to any PR.
Use these likelihood labels:
For every row, name the source path or contract, the exact check, its result, and why the likelihood label follows. A Ruled out scenario is evidence of safety, not a concern. If no Confirmed or Possible scenario remains, say that no concern was found in the affected scope.
Show the developer-visible behavior before and after. Prefer a small code block using actual markup, API usage, configuration, or generated output. If the change is internal, explain the observable effect instead.
Do not fabricate an example. Derive it from the diff, linked issue, documentation, or the reproduction used during verification.
Give a direct verdict:
Use only these confidence values so the report cannot manufacture numerical precision:
Use the lowest applicable value. These are verdict labels, not calculated probabilities. Do not use weighted categories, point deductions, caps, decision gates, or formulas. Do not subtract confidence for missing bureaucracy, irrelevant coverage, or unknowable future behavior.
When confidence is below 100%, explain exactly what is wrong and what check or change would resolve it. When no concern is found after relevant verification, return 100% and safe to merge.
Use references/report.md and keep the report concise. Include only:
Cite facts inline with direct GitHub URLs, immutable SHAs and repository paths, official documentation URLs, or exact commands and observed results. Do not add an evidence ledger, scoring table, gate matrix, policy audit, exhaustive file inventory, or speculative caveats.
Re-fetch the PR after testing. If the head changed, rerun the affected verification before writing the verdict. Update tmp/pr/pr-<number>.md rather than creating duplicate reports.
In the final handoff, list the reports written and state that no GitHub action, product-code change, dependency change, or Git operation was performed.