Command Palette

Search for a command to run...

Назад к скиллам
скилл № 06126

review-changes

Review the working-tree changes (vs main) for correctness, concurrency, architecture, testing, and API/doc issues — following .github/CODE_REVIEW.md — and…

БесплатноБез исполняемых скриптов
adamayoungот adamayoung★ 182 звезды на GitHub

Установить review-changes в Claude Code и Claude Desktop

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

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

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

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

Review Changes

Produce the pre-PR review of the current branch's changes against main, following the canonical .github/CODE_REVIEW.md. This skill scales the review to the size of the change — a single agent when the diff is small, a parallel fan-out with adversarial verification when it's large — and returns a severity-graded report. It does not edit code; the caller (e.g. /deliver's code-review phase, or you) applies the fixes.

Principles

  1. One source of truth. Every reviewer — single or fanned-out — follows .github/CODE_REVIEW.md: the severity rubric, scope, and the mandatory adversarial re-evaluation. Don't invent criteria.
  2. Scale to the change. Don't pay for a fan-out Workflow on a 60-line diff; don't review a 12-file multi-model change through one over-stretched context.
  3. Findings only. Return the report; the caller fixes (test-first) and may re-invoke to converge.
  4. Adversarial verification cuts noise. On the large path, every Critical/High finding is independently refuted before it's reported — the strongest lever against false positives.

0. Gate — skip if there is no reviewable code

Code review exists to review code — Swift source, plus the committed scripts under .claude/workflows/ (decision infrastructure) and Scripts/ (enforcement infrastructure: check-defaulted-witnesses.py runs from make lint and as its own CI Lint step, so a bug there silently weakens a gate — it shipped as a false green once already, passing on an empty scan). If the diff touches none of them, there is nothing to review — return immediately, don't spawn any reviewer.

git diff --name-only origin/main...HEAD \
  | grep -qE '\.swift$|^\.claude/workflows/|^Scripts/' \
  || echo "no-reviewable-code"

If that prints no-reviewable-code (e.g. a docs-only, config-only, or skills-prose change), stop here and report "No reviewable code — code review skipped." Do not run §1–§3. (JSON fixtures under Tests/**/Resources/ accompany Swift changes; a fixture-only change with no .swift is rare — note it and let the caller decide.)

Override — force-review in the arguments skips this gate entirely. The caller has decided the change carries risk the file extensions don't show. /deliver passes it for a reflexive delivery — one that rewrites the skills, agents or review spec the pipeline itself runs, where the diff is markdown but the blast radius is the pipeline (#407 shipped three defects exactly there). This override lifts the gate; it does not choose a path — §1 still decides, and a caller-stated full weight still takes §2b (Risk overrides size), however prose-shaped the diff. Whichever path runs, aim its brief at the change's own subject matter: which rule changed, whether anything still depends on the old wording, and whether the new rule is enforced or merely stated. Without this the gate and the caller contradict each other and the skip silently wins.

If the only reviewable change is a script (.claude/workflows/ or Scripts/), take the §2a single-reviewer path with a script-focused brief in place of the Swift lens: input guards and executable throws, schema shapes, tally / dead-agent handling, and prompt-injection surface (what untrusted text reaches an agent prompt). For a Scripts/ checker add the question that matters most: can it pass while measuring nothing? — an empty scan, a typo'd path, a count compared instead of an explicit set. .github/CODE_REVIEW.md's severity rubric and adversarial re-evaluation still apply; its Swift-specific checks don't.

1. Scope the change

git diff --stat origin/main...HEAD

Judge size (heuristic, not a rigid count):

  • Small / single-unit — one cohesive area (a method + its tests + a model + docs), a handful of source files, roughly under ~200 changed lines → §2a.
  • Large / multi-unit — several new models/methods/services, or a broad diff → §2b.

When unsure, prefer small — escalate to the fan-out only when the diff is genuinely broad.

Risk overrides size. Take §2b however small the diff is when either the caller states the change is full weight, or the diff touches a risky surface — concurrency (actors, Sendable, locks, Task), networking / HTTPClient, Decodable / CodingKeys, or new public API. Size decides how much there is to read; the risk surface decides how many lenses have to read it, and a cohesive one-file concurrency change is the shape whose defects most reliably survive a single pass (#401, #433, #461 each had one found late, by a second lens or a second platform). A caller that passes full has already made this judgement from the plan — do not re-derive it from --stat and quietly overrule it.

2a. Small change → single agent

Spawn the code-reviewer agent on git diff origin/main...HEAD, telling it not to build or run tests (see Reviewers don't build bel

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

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

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

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

FAQ

Что делает скилл review-changes?

Review the working-tree changes (vs main) for correctness, concurrency, architecture, testing, and API/doc issues — following .github/CODE_REVIEW.md — and return a severity-graded report. Scales the machinery to the diff size: a single code-reviewer agent for a small change, or a fan-out-and-verify Workflow for a large/multi-unit one. Produces findings; it does not apply fixes (the caller does).

Как установить скилл review-changes?

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

Скилл review-changes запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить review-changes с