Command Palette

Search for a command to run...

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

code-review-workflow

БесплатноБез исполняемых скриптовНе проверен

Review a change in a fixed order — context, correctness, security, then style — and write feedback that is actionable and ranked by severity. Use when the…

personamanagmentlayerот personamanagmentlayer★ 46 звёзд на GitHub

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

Code Review Workflow

The procedure for reviewing a change. For the body of knowledge behind the judgements — what good code looks like per dimension — use the code-review-expert skill; this skill is the order of operations and the shape of the output.

When to Use This Skill

  • The user asks to review a pull request, a diff or a patch
  • A change needs assessment before merge or deploy
  • The user asks "is this safe to ship?"
  • Review feedback needs triaging or prioritising
  • A team wants a review standard defined

Core Concepts

Order Matters

Reviewing in a fixed order prevents the common failure: spending the whole review on naming and never reaching the concurrency bug. Correctness and security are examined while attention is fresh; style comes last because it is the cheapest to fix and the easiest to automate away.

Severity, Not Volume

Twelve comments of equal weight leave the author guessing. Every comment carries a severity, and a review with no blocking comments says so explicitly.

Severity Meaning Merge
Blocking Incorrect, unsafe, or loses data No
Important Should change, but not a correctness risk Author's call, argued
Minor Improvement, preference with a reason Optional
Question Reviewer does not understand yet Answer, may reclassify

A Finding Needs a Failure

An assertion that something is wrong must come with the input, state or sequence that makes it wrong. "This could race" is an opinion; "two requests for the same order both pass the check at line 41 and both insert" is a finding.

Review the Change, Not the Codebase

Pre-existing problems the diff merely touches are not this author's to fix. Note them separately, as a follow-up, not as a merge condition.

The Workflow

1. Establish context before reading code

gh pr view 482                                  # title, description, linked issue
gh pr diff 482 --name-only                      # what is touched
git log --oneline main..HEAD                    # how it was built
gh pr checks 482                                # does CI pass?

Answer three questions before the first line of the diff: what problem does this solve, does the approach fit the codebase, and is the change the right size? If the approach is wrong, say so now — detailed line comments on code that should not exist waste everyone's time.

2. Map the blast radius

gh pr diff 482 --stat
git diff main...HEAD -- '*.sql' '*.d.ts' 'openapi.*'   # contracts and schema
grep -rn "functionYouChanged" --include='*.ts' src/    # who calls it

Flag anything that changes a public contract, a database schema, a queue message shape or a permission — those need an explicit compatibility answer.

3. Correctness

Read the diff for behaviour, holding these questions:

  • What happens at the boundaries: empty, one, maximum, negative, null?
  • What happens when this runs twice concurrently, or is retried?
  • Which errors can this raise, and is each handled or deliberately propagated?
  • Does the state stay consistent if it fails halfway?
  • Do the tests exercise the behaviour, or only the happy path?

4. Security

Independent of correctness, and never skipped:

  • Authorisation checked per object, not only per route
  • Input validated server-side, with a positive rule rather than a denylist
  • Queries parameterised; no string-built SQL, shell or paths
  • Secrets from configuration, absent from code, logs and errors
  • Errors fail closed and leak nothing about internals
  • New dependency justified, maintained, and pinned

5. Design and maintainability

Only once the above is clear: naming, duplication that now hurts, functions that do several jobs, abstractions that do not pay for themselves.

6. Tests

Ask whether the tests would fail if the behaviour regressed. Coverage that asserts nothing is worse than none, because it buys false confidence. Check that a bug fix carries a test that fails without the fix.

7. Verify claims you can check

Do not take the description on trust when verification is cheap:

gh pr checkout 482
npm test
npm run typecheck && npm run lint
git diff main --stat            # does the size match the description?

8. Write the review

Lead with the verdict, then ranked findings, then the good parts. Comment on lines for specifics; keep the summary for the decision.

Writing a Comment

A useful comment has three parts: what, why, and a way forward.

Blocking — orders.py:88. Two concurrent requests for the same order both pass the status == 'pending' check before either writes, so the order is shipped twice. The check and the update need to be atomic — a conditional update (`UPDATE ... WHER

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

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

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

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

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

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

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

Read
Bash(git:*, gh:*, npm:*, npx:*, pytest:*, go:*, cargo:*)
Grep
Glob

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

references/CHECKLISTS.md

FAQ

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

Review a change in a fixed order — context, correctness, security, then style — and write feedback that is actionable and ranked by severity. Use when the user asks for a code review, wants a pull request or diff reviewed before merge, asks whether a change is safe to ship, or when the task involves reviewing a patch, giving review feedback, triaging review comments, or setting review standards for a team.

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

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

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

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

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

Сравнить code-review-workflow с