pr-reviewing
Review a PR across multiple dimensions — description, code changes, code scan, unit tests — using parallel subagents. Supports GitHub, GitLab, and enterprise…
от yimwoo★ 27 звёзд на GitHub
Установить pr-reviewing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
HOTL PR Review
Overview
Review a pull request end-to-end across 4 dimensions (description/ticket, code changes, code scan, unit tests) using parallel subagents. Produces a structured verdict report and optionally posts line-level comments on GitHub.
Announce: "Starting PR review. Detecting platform and fetching PR data..."
Output Contract
This skill produces a structured review report. The canonical schema is defined in
docs/contracts/pr-review-output.md. All platforms must emit every section in that
contract. Platform-specific rendering (tables, inline comments, etc.) is handled by
platform docs, not this skill.
Key rules from the contract:
- All 9 sections always present, even on BLOCK
- Dimension verdicts summarize sections; individual findings may have mixed severities
- Overall verdict derived from dimension verdicts, not individual findings
- The contract is mandatory even when platform-native findings are emitted before it
Step 1: Platform Detection & PR Fetching
Resolve the PR
- If the user provided a PR URL → parse org/repo and PR number from it
- If no URL → detect from current branch:
- Try
gh pr view --json number,title,body,baseRefName,headRefName,url→ if succeeds, use GitHub mode - Try
glab mr view→ if succeeds, use GitLab mode - If both fail → use local-only mode (git diff against base branch)
- Try
Platform Modes
| Platform | CLI | Mode | Capabilities |
|---|---|---|---|
| GitHub (public) | gh |
full | Local report + post review comments |
| GitLab | glab |
local-only | Local report only |
| Enterprise/VPN | none | local-only | Local report only (git diff fallback) |
Fetch PR Data
Full mode (GitHub):
gh pr view <number> --json title,body,baseRefName,headRefName,changedFiles,additions,deletions
gh pr diff <number>
GitLab mode:
glab mr view <number>
glab mr diff <number>
Local-only fallback:
git log --oneline main..HEAD
git diff main...HEAD
git diff --name-only main...HEAD
Ticket Extraction
- Scan the PR description for ticket references:
- Patterns:
JIRA-1234,ABC-123,#123, or full URLs (Jira, GitHub Issues, GitLab Issues, Linear)
- Patterns:
- Attempt to fetch ticket content:
- GitHub Issues:
gh issue view <number> --json title,body - Jira URL:
WebFetchthe ticket page (user must be authenticated/on VPN) - GitLab Issues:
glab issue view <number> - Generic URL:
WebFetchand extract text
- GitHub Issues:
- If fetch fails → skip gracefully, note "Ticket not accessible" in report
Step 2: Dispatch Parallel Subagents
Dispatch 4 subagents simultaneously using the Agent tool. Pass each subagent the PR data collected in Step 1.
Subagent A: Description & Ticket Review
Prompt template:
---
You are reviewing a PR's description and ticket alignment.
**PR Title:** {title}
**PR Description:**
{body}
**Linked Ticket (if available):**
{ticket_content or "No ticket linked/accessible"}
## Review Checklist
1. **Description quality:**
- Does it explain WHY this change is needed?
- Does it explain WHAT changed?
- Does it explain HOW it works (if non-obvious)?
- Is it clear enough for a reviewer unfamiliar with the context?
2. **Ticket alignment (if ticket available):**
- Does the PR address the ticket's requirements?
- Are all acceptance criteria covered?
- Is there scope creep (PR does more than ticket asks)?
- Is there scope gap (ticket asks for more than PR delivers)?
## Output Format
Return EXACTLY this format (two separate blocks — one for description, one for ticket):
DIMENSION: Description VERDICT: PASS | WARN | BLOCK FINDINGS:
- [BLOCK|WARN|NOTE]: [finding description] SUMMARY: [one sentence]
DIMENSION: Ticket Alignment VERDICT: PASS | WARN | BLOCK | N/A FINDINGS:
- [BLOCK|WARN|NOTE]: [finding description] (or "No ticket linked" if none found) SUMMARY: [one sentence]
---
Subagent B: Code Change Review
Prompt template:
---
You are reviewing code changes in a PR.
**Changed files:** {file_list}
**Full diff:**
{diff}
## Review Checklist
1. **Correctness:** Logic errors, off-by-one, null/undefined risks, race conditions
2. **Edge cases:** Missing error handling at system boundaries, unhandled states
3. **Readability:** Unclear naming, magic numbers, overly complex logic
4. **Design:** YAGNI violations, unnecessary abstractions, code duplication. Reference `docs/checklists/architecture-and-design.md` for SOLID and architecture smell heuristics. These are review heuristics, not merge policy — use professional judgment to determine severity. If the checklist file is not available, continue with best-effort review.
5. **Security (quick scan):** Obvious injection risks, hardcoded secrets (detailed scan in separate subagent)
6. **Removal and simplification:** Reference `docs/checklists/removal-and-simplification.md`. Flag unused/redundant code introduced or left behind by this PR. Classify as safe-delete-now or defer-with
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-reviewing?
Review a PR across multiple dimensions — description, code changes, code scan, unit tests — using parallel subagents. Supports GitHub, GitLab, and enterprise platforms.
Как установить скилл pr-reviewing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-reviewing запускает скрипты?
Нет, скилл состоит только из инструкций (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…