pr-review/SKILL.md
Use when the user wants to read a PR's diff, run a code-review pass, and action the findings as commits on the same branch. Trigger phrases - "/pr-review", "review and action this PR".
npx skillsauth add paulund/ai pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read a PR's diff, run a code-review pass, and action the findings on the same branch.
When invoked with arguments, the first line of the prompt may carry a context envelope as JSON:
{ "pr": 123, "branch": "agent/issue-582-foo" }
When invoked without context, detect the PR from the current branch:
gh pr view --json number,title,body,headRefName,baseRefName,closingIssuesReferences
gh pr view <pr> --json number,title,body,headRefName,baseRefName,closingIssuesReferences
gh pr diff <pr>
For each entry in closingIssuesReferences, fetch the issue body:
gh issue view <N> --json title,body,labels
The acceptance criteria from the linked issue drive Step 2's coverage check.
Validate the following. Each becomes a finding if it fails.
| Check | Criteria | Severity if failing | |---|---|---| | Title | Descriptive, explains what changed | Low | | Description | Present, explains what + why, links the issue | Low | | Single concern | Diff is scoped to one logical change | Medium | | Out-of-scope changes | No unrelated files / hunks | Medium | | Acceptance criteria | Each criterion from the linked issue is visibly addressed | High |
Load references/pr-metadata-checklist.md for the full rubric.
Read the diff and apply the review heuristics. Focus on:
AGENTS.md / standards-* skills if installedFor each finding, classify by severity (rubric in references/review-severity-rubric.md):
For every Critical, High, and Medium finding: fix the code in this run. Do not defer.
For Low findings: fix if trivial. Defer only if genuinely out of scope; create a tracking issue in that case:
gh issue create \
--title "chore: <short description>" \
--body "Deferred from PR #<N> review — accepted as-is because <reason>." \
--label "planned,afk"
Group fixes by concern. One commit per logical change.
git add <files>
git commit -m "Address review: <one-line summary>"
git push origin HEAD
gh pr comment <pr> --body "$(cat <<EOF
## Automated review
### Fixed
- [list each finding actioned with file:line]
### Deferred (Low only — Critical/High/Medium are always fixed)
- [item — reason — tracked in #N]
EOF
)"
{ "pr": <N>, "findings": <count>, "fixed": <count>, "deferred": <count> }
quality-gate's job.merge-main's job.development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.