Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pr-reviewer

БесплатноЗапускает вложенные скриптыНе проверен

Audits a pull request cold, without authoring context, for correctness, convention compliance, test coverage and linter findings, then posts a structured…

crewrigот crewrig★ 24 звезды на GitHub

Об этом скилле

PR Reviewer

Audit a pull request as an independent reader: no authoring context, no shared assumptions, no manufactured objections. A review that approves everything is worthless, and one that invents objections wastes the author's time, so every finding names a file, a line and a reason, and a solid change is approved plainly.

You have no stake in the change. Read the diff as if you had never seen it. Be skeptical but fair: say what is wrong, where and why, or say it is sound.

How the scripts report

Every script under scripts/ runs as node scripts/<name>.ts, resolved against this skill's directory. Each answers --help, prints one {ok, data, findings} object with --json (human text then goes to stderr), and exits 0 ok, 1 findings, 2 usage error, 3 the environment or an input is unusable. Read the exit code first: 3 never means the change is bad.

Protocol

Six steps, in order. Skipping ahead is how a review ends up approving a change whose CI is red.

1. Preflight: CI status and iteration label

Run node scripts/ci-preflight.ts <pr> --json (add --required when the repository distinguishes required checks).

  • Exit 0: every check passes; continue.
  • Exit 1: read data.verdict_ceiling. A failing check caps the verdict at REQUEST_CHANGES (or COMMENT when the failure is clearly an infrastructure flake, said explicitly with the job name). A pending check caps it at COMMENT with the verdict stated as deferred until CI resolves.
  • Exit 3: gh is unusable; say so in the verdict instead of guessing a status.

To wait for CI, make ONE call: gh pr checks <pr> --watch in the foreground, with the longest timeout the tool allows (a background task does not wake every session). Never wait with a sleep, an until loop, a monitor or repeated queries, since each re-reads a large context. Never end your turn to wait; nothing wakes a session that did. If CI is still pending at the timeout, post the verdict capped at COMMENT with the CI status; do not wait again.

When that command exits, make one direct ci-preflight.ts query before composing the verdict, since the watch only observes the checks from outside.

A cancelled check with no newer push is a failure until proven otherwise: cancel-on-failure cancels the run when any job fails. Read the failure annotations (gh api repos/<o>/<r>/check-runs/<id>/annotations) or the run summary, and name the failing job in the verdict (docs/runbooks/ci-cancelled-run-diagnosis.md).

Ghost check: a check still pending although its workflow run is completed/success counts as resolved when the merge state is CLEAN. ci-preflight.ts reports it apart, as bucket ghost and in data.ghosts, and does not count it as pending. Name it in the verdict's CI section; do not defer the verdict because of it.

The CI status goes into the verdict in writing (pass, fail or pending, with the failing job). On a later pass of the same seat the reading of the diff narrows (step 3), but this step never does: the head's CI state is part of every pass.

Then run node scripts/iter-label.ts <pr> --json. Finding identifiers on the review surface are minted from the iter:<N> label (see Finding tags), so the label must exist before the first identifier. Exit 0 gives data.iter (and adds iter:1 itself when none existed). Exit 3 means the label could not be added: state that in the verdict's CI section and mint no identifier under an assumed number.

2. Read the project conventions

Read references/step-2-conventions.md.

3. Fetch the diff and the metadata

Read references/step-3-fetch.md. A seated pass is bounded from its second pass onward; references/seat-obligations.md holds the seat line, the dossier and the vacancy rules.

4. Run the linters

Read references/step-4-linters.md.

5. Compose the verdict

Read references/step-5-compose.md (the seat line's placement per transport is in references/seat-obligations.md), then check the body with node scripts/lint-verdict.ts --surface <review|specs|plan> --transport <review|comment> --ordinal <N> [--prior-ids <ids>] <file>. Exit 1 lists malformed tags, identifiers or a misplaced seat line: fix them before posting, because a finding without its tag is returned to the reviewer and costs the author a round trip.

6. Post the review

Run node scripts/post-verdict.ts <pr> --event <approve|request-changes|comment> --body-file <file> --dry-run first, then without --dry-run. The script chooses the transport from the posting identity: a formal review when the authenticated login differs from the author, a plain ## Verdict: … comment when they are the same (GitHub refuses a self-approval), and it refuses a body over 12 KB. Exit 3 with data.rung denied means the forge refused the post: return the full verdict to the orchestrator and stop. Asking another agent to post it would launder a permission this session was denied.

Before posting, read `refe

Полный SKILL.md на GitHub

Установить pr-reviewer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/assert-fresh-observation.mdreferences/seat-obligations.mdreferences/shared-finding-class-taxonomy.mdreferences/shared-friction-reporting.mdreferences/shared-grounding-discipline.mdreferences/spec-review-obligation.mdreferences/step-2-conventions.mdreferences/step-3-fetch.mdreferences/step-4-linters.mdreferences/step-5-compose.mdscripts/check-comment-size.tsscripts/ci-preflight.tsscripts/iter-label.tsscripts/lint-json.tsscripts/lint-markdown.tsscripts/lint-python.tsscripts/lint-skill.tsscripts/lint-typescript.tsscripts/lint-verdict.tsscripts/post-verdict.ts

FAQ

Что делает скилл pr-reviewer?

Audits a pull request cold, without authoring context, for correctness, convention compliance, test coverage and linter findings, then posts a structured verdict (Approve, Request Changes or Comment) with the CI status, a seat line and class-tagged findings. Use when asked to review, audit or approve a pull request or a spec pull request, to give a second opinion on a change, to run a REVIEW pass or to post a verdict. Trigger terms: review PR, code review, audit pull request, verdict, request changes, approve, seat, cold review. Not for writing a pull-request body or logbook entry (pr-logbook), reviewing uncommitted local changes, composing a local commit message or writing a spec (spec-author).

Как установить скилл pr-reviewer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-reviewer запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить pr-reviewer с