pr-review-html
БесплатноБез исполняемых скриптовНе проверенPull a PR from GitHub, run parallel review agents (code reuse, quality, efficiency, spec adherence), apply local fixes, and write a self-contained HTML review…
от ArjenSchwarz★ 20 звёзд на GitHubОб этом скилле
PR Review HTML
Fetch a GitHub PR, review it through multiple specialized agents, and produce a self-contained HTML review at pr-review.html in the repo root so the user can read it in a browser before merging.
Phase 1: Fetch the PR
Resolve which PR to review, in this order:
- An explicit number, URL, or branch name from the user
- Otherwise the PR for the current branch via
gh pr view --json number
Pull what you need to review:
gh pr view <pr> --json number,title,author,baseRefName,headRefName,headRefOid,isCrossRepository,body,url,state,commits,files,createdAtgh pr diff <pr>for the unified diff the review agents read (Phase 7 regenerates per-file diffs from the working tree after fixes)
Record headRefOid (the head SHA), isCrossRepository (true for a fork PR), and baseRefName; Phases 5 and 7 use them. Note <owner>/<repo> from url — every gh api and gh run call in this skill carries -R <owner>/<repo>, and list endpoints use --paginate.
If the user isn't on the PR branch, run gh pr checkout <pr> so any fixes land on the right local branch. If the working tree is dirty, stop and ask before checking out — silently switching branches risks losing work. After checkout, git fetch origin <baseRefName> and record MERGE_BASE=$(git merge-base origin/<baseRefName> HEAD); the diffs, the diagram, and the baseline lookup all compare against it.
Phases 4 and 5 execute the branch's install scripts and tests on this machine, with your environment and credentials. That applies to fork PRs too: this skill checks out and runs whatever PR it is asked to review.
Keep the PR body, author, createdAt, and url from the gh pr view JSON — these flow into Phase 7's pr_description section so the reader can see the author's framing verbatim.
Show the user which PR you're about to review (number, title, author, head → base, commit count, fork or not) before doing the heavier work — it's a cheap sanity check that catches a wrong PR number early.
Working directory. Every generated input — diff fragments, JUnit and coverage files, the diagram, the review JSON itself — lives in $INPUTS, outside the working tree so nothing lands in git status:
INPUTS="${CLAUDE_JOB_DIR:-$(mktemp -d)}/review-inputs"; mkdir -p "$INPUTS"
Both $CLAUDE_JOB_DIR and mktemp -d yield absolute paths; never use a relative one, as later steps run in subshells where it would resolve into the wrong directory.
Phase 2: Locate the spec (if any)
Phase 4 review and Phase 6 explanation are both richer when grounded in the design intent, so look for a matching feature spec.
- Use the PR head branch name and title as hints
- Search
specs/for a folder matching that feature - If found, read requirements, design, tasks, and decision log
- If not found, skip spec-aware checks and continue
Phase 3: Launch review agents in parallel
Spawn all agents in a single message so they run concurrently. Pass each one the full diff — they need complete context to spot cross-file issues, and re-fetching it per agent wastes time.
Agent 1 — Code reuse
For each change:
- Grep for existing utilities, helpers, and similar patterns. Common locations: utility directories, shared modules, files adjacent to the changes.
- Flag any new function that duplicates existing functionality, and suggest the existing one.
- Flag inline logic that could use an existing utility — hand-rolled string manipulation, manual path handling, ad-hoc type guards, custom env checks.
Agent 2 — Code quality
Look for hacky patterns:
- Redundant state (duplicates existing state, cached values that could be derived, observers that could be direct calls)
- Parameter sprawl (new params bolted onto a function instead of restructuring it)
- Copy-paste with slight variation (near-duplicates that should share an abstraction)
- Leaky abstractions (exposing internals or breaking existing boundaries)
- Stringly-typed code where existing constants, enums, or branded types would fit
Agent 3 — Efficiency
Look for waste:
- Redundant computations, repeated reads, duplicate API calls, N+1 patterns
- Independent operations run sequentially that could run in parallel
- New blocking work added to startup or per-request hot paths
- Pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
- Unbounded data structures, missing cleanup, listener leaks
- Reading whole files when a slice would do, loading everything when filtering for one
Agent 4 — Spec & docs (only if a spec was found)
- Implementation matches requirements and design; divergences are documented in the decision log
- README, CLAUDE.md, or related docs need updates to reflect the changes
- Tests exist for new/modified behavior and test behavior, not implementation details
Phase 4: Fix issues locally
Aggregate the agent findings and fix them on the checked-out PR branch. The user reviews the HTML and decides
Установить pr-review-html в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-review-html?
Pull a PR from GitHub, run parallel review agents (code reuse, quality, efficiency, spec adherence), apply local fixes, and write a self-contained HTML review page to the repo root. Use whenever the user wants to review a PR before merging or asks to "review PR <number>", "look at this PR", "give me an HTML review of PR X", or wants a browseable artifact for a GitHub pull request — even if they don't explicitly say "HTML".
Как установить скилл pr-review-html?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-review-html запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic