$npx -y skills add neuromechanist/research-skills --skill pr-review-toolkitReview pull requests and recent code changes across specialized lenses: general code quality, tests, error handling and silent failures, comments and docs, type design, and simplification. Use when the user asks to review a PR, review recent changes, check tests, check error hand
| 1 | # PR Review Toolkit |
| 2 | |
| 3 | Portable PR review skill adapted for the project plugin. The upstream Anthropic |
| 4 | `pr-review-toolkit` inspired the review lenses; this implementation keeps the |
| 5 | procedure and rubrics in `references/` so Codex, Claude Code, and Copilot can use |
| 6 | the same source of truth. |
| 7 | |
| 8 | ## Review Lenses |
| 9 | |
| 10 | - `code`: project rules, bugs, contracts, maintainability, security, and performance. |
| 11 | - `tests`: behavioral coverage, edge cases, negative paths, and brittle tests. |
| 12 | - `errors`: silent failures, broad catches, hidden fallbacks, and unhelpful user-facing errors. |
| 13 | - `comments`: comment accuracy, stale documentation, redundant comments, and missing rationale. |
| 14 | - `types`: invariants, validation boundaries, encapsulation, and illegal states. |
| 15 | - `simplify`: clarity and refactoring opportunities while preserving behavior. |
| 16 | - `all`: all applicable lenses. This is the default. |
| 17 | |
| 18 | ## Dispatch |
| 19 | |
| 20 | Prefer a fresh-context reviewer when the current tool supports subagents. The |
| 21 | reviewer must read `references/review-procedure.md` and |
| 22 | `references/review-rubrics.md` before producing findings. |
| 23 | |
| 24 | - **Claude Code:** run `Task(subagent_type: "pr-review-toolkit", ...)` if the bundled agent is available; otherwise follow the fallback branch. |
| 25 | - **Codex CLI:** plugin installation exposes this skill, not a Codex subagent. To use a fresh-context Codex reviewer, first copy `agents/templates/pr-review-toolkit.toml` to `~/.codex/agents/` or `.codex/agents/`, then invoke that configured agent if the current Codex surface supports `/agent`. If no Codex subagent is configured or available, use the fallback branch. |
| 26 | - **Copilot CLI:** plugin installation exposes this skill and, through `.github/plugin/plugin.json`, the `.agent.md` reviewer in `agents/templates/`. Invoke that configured agent when the current Copilot surface supports custom agents. If running outside a plugin install, copy `agents/templates/pr-review-toolkit.agent.md` to `.github/agents/` or `~/.copilot/agents/`. If no custom agent is available, use the fallback branch. |
| 27 | - **Fallback:** run the review inline in the current context after reading both reference files. This is the portable default path. |
| 28 | |
| 29 | ## Inputs To Collect |
| 30 | |
| 31 | - Scope: PR number, branch range, staged changes, unstaged changes, or explicit files. |
| 32 | - Lens selection: one or more of `code`, `tests`, `errors`, `comments`, `types`, `simplify`, or `all`. |
| 33 | - Mode: advisory review by default; edit mode only when the user explicitly asks to simplify/refine or implement review fixes. |
| 34 | |
| 35 | ## Required Workflow |
| 36 | |
| 37 | 1. Read `references/review-procedure.md`. |
| 38 | 2. Read `references/review-rubrics.md`. |
| 39 | 3. Inspect the local project rules before generic preferences: nearest `AGENTS.md`, `CLAUDE.md`, `.rules/`, and relevant framework guidance. |
| 40 | 4. Determine the diff scope with `git status`, `git diff`, `git diff --cached`, `gh pr view`, or `gh pr diff` as appropriate. |
| 41 | 5. Select applicable lenses. Use `code` for every review unless the user explicitly excludes it. |
| 42 | 6. Report findings first, ordered by severity, with concrete file and line references. |
| 43 | 7. If no actionable findings exist, say so clearly and list any residual test gaps or verification limits. |
| 44 | |
| 45 | ## Output Shape |
| 46 | |
| 47 | Use this structure unless the user asks for a different format: |
| 48 | |
| 49 | ```markdown |
| 50 | **Findings** |
| 51 | - Critical: ... |
| 52 | - Important: ... |
| 53 | - Moderate: ... |
| 54 | |
| 55 | **Questions** |
| 56 | - ... |
| 57 | |
| 58 | **Residual Risk** |
| 59 | - ... |
| 60 | ``` |
| 61 | |
| 62 | For `simplify` in edit mode, make the smallest behavior-preserving patch, run the |
| 63 | relevant tests or checks, and summarize what changed. |
| 64 | |
| 65 | ## Attribution |
| 66 | |
| 67 | Inspired by Anthropic's `pr-review-toolkit` plugin in |
| 68 | `anthropics/claude-code/plugins/pr-review-toolkit`. The upstream plugin README |
| 69 | identifies the plugin license as MIT; this project implementation is written as |
| 70 | an original project skill with attribution rather than a verbatim copy. |