pr-review
Focused pull request review practices with severity-ranked, file-and-line-cited findings across four angles: security, performance, tests, and architecture…
от Mindrally★ 323 звезды на GitHub
Установить pr-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
PR Review
This skill covers focused, angle-specific pull request review: picking the right lens (security, performance, tests, or architecture), producing specific and severity-ranked findings, and closing with a clear merge verdict.
Workflow for Reviewing a PR
- Pick the angle — Determine emphasis from the user's request ("security", "perf", "tests", "arch"). If unspecified, ask which angle to use, or default to security as the highest-risk default.
- Get full file context — A diff alone routinely misses bugs that live just outside the changed lines. If only a diff is available, request the surrounding file(s) before making confident claims.
- Review against the angle's checklist — Work through the relevant checklist below in priority order; do not mix angles unless the user asked for a full review.
- Write specific, cited findings — Every finding names a file and line number and states the concrete defect, not a vague impression.
- Rank by severity — Group findings as blocker, important, or nit.
- State uncertainty explicitly — If the diff doesn't give enough context to be sure, say so and ask for more code rather than guessing.
- End with a verdict on its own line —
Safe to merge | needs changes | reject(or the architecture-specific verdict below).
Output Discipline
Applies to every review angle:
- Cite file path and line number for each finding.
- Rank findings by severity: blocker, important, nit.
- Be specific. "This looks risky" is not a finding; "
src/auth.ts:42— JWT secret read from request body, see line 41" is a finding. - If the diff doesn't give enough context to be sure, say so explicitly and ask for the surrounding file.
- End with a verdict on its own line:
Safe to merge | needs changes | reject.
Angle 1: Security
Review the PR for security defects, in order of priority:
- Auth/authz — new endpoints or branches missing auth checks, role assumptions, IDOR (insecure direct object reference).
- Input validation — untrusted input flowing into queries, shell commands, file paths, deserialization, or
eval. - Injection — SQL, NoSQL, command, prompt injection, template injection.
- Secrets — hardcoded keys/tokens, secrets in logs, secrets in client-bundled code,
.envcommitted to the repo. - Output encoding — XSS via unescaped templating, raw HTML in user content, JSONP-style leaks.
- Crypto/randomness —
Math.random()used for tokens, MD5/SHA1 for password or integrity purposes, missing IVs, custom-rolled crypto. - Data exposure — PII in logs, overshared API responses, missing redaction.
Skip nice-to-haves; stick to defects.
Angle 2: Performance
Review for performance regressions:
- N+1 patterns — loops doing a DB or network call per item instead of batching.
- Hot-path allocations — new objects/arrays/maps created inside loops, regexes recompiled per call.
- Unbounded work — missing pagination, unconstrained result sets, recursion without a depth cap.
- Bad async — sequential
awaits wherePromise.allis correct, missing concurrency limits. - Cache misuse — cache keys that omit a relevant variable, absent or pathological TTLs.
- Algorithm complexity — hidden O(n²) (e.g.
.some()inside.map()), sorting inside a loop.
Quote the specific line, name the complexity class or bad pattern, and suggest the fix.
Angle 3: Tests
Review the test coverage on the PR:
- Tests for new code paths — every new branch should have at least one test.
- Edge cases — empty input, null/undefined, boundary values, errors thrown by dependencies.
- Assertion strength — assertions that would pass with the wrong value, snapshot-only tests, tests that only check the happy path.
- Mocking discipline — mocks that don't fail when the real interface changes, over-mocking that hides real behavior.
- Determinism — date/time/random/network not stubbed, leading to flaky tests.
- Test names — names that don't describe the behavior under test.
A test that exists is not the same as a test that catches regressions — read the assertions, not the test name.
Angle 4: Architecture
Pull back from line-level concerns to review the shape of the change:
- Boundary drift — where did the seam between layers move? Did UI start reaching into the DB? Did domain types start importing transport types?
- Premature abstraction — interfaces, factories, or config layers with only one implementation; flag these as debt.
- Coupling — utilities now importing from feature modules, shared mutable state being introduced.
- Scalability — if this code path goes 10x, what breaks first?
- Reversibility — if this turns out wrong in a month, how hard is the rollback? Call out one-way doors explicitly.
- Naming — types/functions named for the implementation (
UserManagerImplV2) rather than the role (UserDirectory).
End with: `Architecturally sound | ne
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-review?
Focused pull request review practices with severity-ranked, file-and-line-cited findings across four angles: security, performance, tests, and architecture. Use when asked to review a pull request, review a diff or set of changes, review "this PR," or provide a code review before merge.
Как установить скилл pr-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…