一键导入
pr-review
Review code changes or a pull request. Delegates to specialist agents for code quality, security, performance, and documentation, in parallel.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review code changes or a pull request. Delegates to specialist agents for code quality, security, performance, and documentation, in parallel.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Deep, fan-out research over the codebase to answer a big question (test gaps, how a subsystem works end to end, a risk/security/dead-code audit, "where does X happen everywhere"). The codebase analog of deep web research: parallel explorer agents gather file:line-cited findings, surprising or high-stakes claims are adversarially verified against current code, and the result is a single prioritized report. Use for broad/deep questions that span many files and modules, NOT a one-file lookup and NOT a single-task pre-plan (use /scout for that, /explain for one thing).
Investigate a non-trivial task, then produce the plan for it. Emits a file:line-cited findings report covering current behavior, the route/component boundary it crosses, helpers to reuse and stale docs, followed by a sequenced plan and any blocking open questions. Use before touching an unfamiliar backend route, adding an ingest path, reworking a panel, or any cross-cutting change. The point is to ground the plan in evidence, not memory. Investigates deeply and verifies adversarially by default; never edits files.
Turn a change into a checkable manual test script the owner runs in the app, not prose about testing. Reachability-verified steps grouped by precondition, one observable outcome each, with unreachable actions listed up top and known regressions flagged. Use when the user asks for test steps, a test plan, or how to verify a change by hand. This is the manual counterpart to test-writer (which writes automated pytest / vitest tests).
Trim verbose prose, walls of text, journey narration, and WHAT comments from docs and code without losing vital info. Targets markdown files (README, CLAUDE.md, rules, skills, agents) and, when asked, code comments / docstrings. Applies the "WHY not WHAT" rule, the "describe current behavior not the journey" rule, and the "release notes not implementation rationale" rule from `.claude/rules/project-workflow.md` and `.claude/rules/code-quality.md`. Use after a feature lands and the docs around it have accumulated cruft, or when a file feels heavier than it earns. Always plans before editing.
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
Scan changes, commit, push, and create a PR. With confirmation at each step
| name | pr-review |
| description | Review code changes or a pull request. Delegates to specialist agents for code quality, security, performance, and documentation, in parallel. |
| argument-hint | [PR number | staged | file path | omit to auto-detect] |
| disable-model-invocation | true |
Review code changes by delegating to specialist agents in parallel and synthesizing a unified report. Works with PRs, staged changes, or specific files.
Check $ARGUMENTS for the word verbose. Strip it from the argument string before parsing the rest.
file:line: issue (fix: hint)). Synthesis report stays compact.verbose: full breakdown. Each finding gets the multi-field block (Severity, Confidence, etc.). Synthesis report uses the full template.When dispatching reviewers in Step 3, include the word verbose in each Task call's prompt only if the user asked for it. Otherwise omit; the reviewers default to terse.
Parse $ARGUMENTS to determine what to review:
123 or #123): fetch with gh pr view $ARGUMENTS. This is the full PR review path (includes PR quality checks in Step 2).gh pr view to detect a PR for the current branch. If a PR exists, use it. If not, fall back to git diff --cached (staged), then git diff (unstaged).staged: review git diff --cached. If nothing staged, fall back to git diff.If there are no changes to review, say so and stop.
Skip this step if reviewing staged changes or a file. Jump to Step 3.
When reviewing a PR, fetch and check:
gh pr diff $NUMBER for the full diffgh pr checks $NUMBER for CI statusgh api repos/{owner}/{repo}/pulls/$NUMBER/comments for review commentsReview the PR itself before the code:
Decide which reviewers apply by reading the diff content, not just file paths:
| Reviewer | When to include |
|---|---|
code-reviewer | Always. Universal correctness pass. |
security-reviewer | Auth, input handling, queries, tokens, session management, file path construction, SQL or HTML or template strings. |
performance-reviewer | Endpoints, DB queries, loops over collections, caching, connection management. Skip for pure-docs, config-only, or static-asset diffs. |
doc-reviewer | .md changes, significant docstring or JSDoc changes, API docs. |
Dispatch all applicable reviewers in PARALLEL. Send one message that contains one Task tool call per applicable reviewer (use subagent_type matching the reviewer name). Do NOT invoke them sequentially. Parallel dispatch cuts wall-clock time from N times the slowest review to roughly the slowest single review, with no extra token cost.
If only one reviewer applies (a pure-docs diff, for example), a single Task call is fine. Skip the parallel pattern when there's nothing to parallelize.
While the reviewers run, you can read the PR description, recent CI logs, or open comments to enrich the synthesis in Step 4. Don't wait idly.
Use the terse template by default. Use the verbose template only if the user passed verbose.
For PR reviews:
## PR Review: #[number]: [title]
[base] -> [head]. [N files, +X/-Y lines]. CI: [pass | fail: <checks>]. PR quality: [ok | issues: <list>].
### Findings ([N])
- [agent] file:line: issue (fix: hint)
- [agent] file:line: issue (fix: hint)
### Verdict
[Ready to merge | Needs changes: <one-line blocker>]
For non-PR reviews (staged or file):
## Review ([scope])
[N findings from <agents>]:
- [agent] file:line: issue (fix: hint)
- [agent] file:line: issue (fix: hint)
If no findings, output a single line: "No issues found across [agents]."
verbose)For PR reviews:
## PR Review: #[number]: [title]
**Author**: [author] | **Base**: [base] -> **Head**: [head] | **Changed**: [N files, +X/-Y lines]
### PR Quality
- Title: [ok / needs improvement]
- Description: [ok / missing test plan / empty]
- Size: [ok / large, consider splitting]
- CI: [passing / failing, list failures]
- Unresolved comments: [none / list]
### Code Review
#### Critical / High
- [Agent] File:Line: issue
#### Medium
- [Agent] File:Line: issue
#### Low
- [Agent] File:Line: issue
### Verdict
[Ready to merge / Needs changes, summarize blockers]
For non-PR reviews (staged or file):
## Review Summary
**Scope**: [staged changes / file path]
**Agents run**: [list]
### Critical / High
- [Agent] File:Line: issue
### Medium / Low
- [Agent] File:Line: issue
### Passed
- [areas with no issues]
Either way: deduplicate findings that overlap between agents. Attribute each finding to the agent that found it.