Command Palette

Search for a command to run...

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

ir:code-review

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

Review a working diff for defects and report findings worst-first — the repo-owned, agent-invocable counterpart to the built-in `/code-review`, which is…

ingo-eichhorstот ingo-eichhorst★ 105 звёзд на GitHub

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

Review the Working Diff

/ir:code-review [effort] [base]
Argument Values Default
effort low · medium · high · xhigh · max medium
base any git diff spec origin/main...HEAD

Both are positional and both optional: /ir:code-review, /ir:code-review high, and /ir:code-review low origin/main...HEAD are all valid. A bare effort word is an effort, never a PR number — this skill reviews a local diff and never takes a PR argument.

Why this skill exists

The built-in /code-review is marked disable-model-invocation: the Skill tool refuses it and it cannot be reached from Bash either. It is a human-triggered path. That left ir:exec's review gate unrunnable (#1205), so this is the repo's own reviewer — same job, agent-invocable, and aware of conventions in AGENTS.md that a general-purpose reviewer wouldn't check.

It is not a replacement for the real thing. For a large or risky diff, a human running /code-review <tier> origin/main...HEAD — or /code-review ultra for the cloud multi-agent pass — is still the stronger review, and recommending that is a legitimate outcome of this skill.

1 · Resolve the diff

git fetch origin main                      # refresh the base before diffing
git diff --stat <base>                     # scope
git diff <base>                            # the review surface

This skill already defaults to origin/main...HEAD. Keep it — inside a worktree, both of the defaults you'd otherwise reach for by hand mislead: the local main ref is stale (never updated when other PRs merge, so main...HEAD drags in already-merged hunks), and once the branch has been pushed with git push -u, @{upstream}...HEAD is ~empty (upstream now points at the pushed branch, so it reviews nothing). origin/main...HEAD after a fetch is the honest surface.

Review only what the diff changed, plus whatever the change puts at risk. An unrelated pre-existing wart is not a finding.

2 · Effort ladder

Effort buys depth, and above low it buys an adversarial verify pass. Each tier includes everything below it.

Effort Find Verify pass
low One careful read of the whole diff; obvious correctness and convention breaks none — report findings unverified
medium Trace each changed code path to its callers; check the tests that cover it one refutation attempt per finding
high Probe blast radius beyond the diff; confirm tests genuinely exercise the new behaviour rather than merely passing 3 independent refutation attempts per finding
xhigh Re-derive the change's intent from the issue/PR and check the diff actually achieves it; hunt edge cases by construction 3 attempts, each from a distinct lens (correctness · security · does-it-reproduce)
max Everything above, plus a completeness critic: what did this review not look at? 3 distinct-lens attempts, then re-review whatever the critic surfaced

Never escalate past the effort you were given. If the diff clearly warrants more, say so in the report instead of silently spending it.

3 · Dimensions

Defects first — this skill hunts bugs. Quality cleanups are secondary here (/simplify owns that pass, and ir:exec runs it separately).

  • Correctness — logic errors, off-by-one, nil/zero-value handling, error paths that swallow or mis-wrap, concurrency (races, unsynchronised shared state, aliasing of returned structs), resource leaks, boundary conditions.
  • Repo conventions (AGENTS.md Key Conventions — a break here is a real finding, not a nit):
    • The session-state vocabulary is session.CanonicalStates() and nothing else — a call site that retypes the list has become a second source of truth. No cancelled state (cancellation maps to ready). Watch for enumerations that were complete under an older vocabulary: a case arm, a switch, a format string or a doc line naming some-but-not-all states is the shape that shipped four separate defects in #1796. tools/state-vocabulary-lint.sh catches the single-line ones; a partition split across lines is yours to catch.
    • Hexagonal import direction: domain/ → ports/ → adapters/ → application/services/. domain/ and ports/ must not import outward; application/services/ reaches adapters/inbound/ only through ports/.
    • Errors are logged via the Logger interface, not propagated with fmt.Errorf.
    • Child sessions (subagents, background agents) link via ParentSessionID.
    • Every adapter read or modification is consent-gated behind one of its declared Permissions — nothing exercised while pending or denied.
    • Format-specific transcript parsers live in the agent adapter package, not in shared tailer code.
  • Test coverage — does a test actually reach the changed behaviour? A defect fix needs a test that was seen red before the fix existed; a test that passes
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

FAQ

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

Review a working diff for defects and report findings worst-first — the repo-owned, agent-invocable counterpart to the built-in `/code-review`, which is `disable-model-invocation` and can only be run by a human. Scales from a single read to an adversarially-verified pass, and checks this repo's own conventions (the derived session-state vocabulary, hexagonal layering, permission gating, defect-tests-seen-red) on top of ordinary correctness. Invoked as `/ir:code-review [effort] [base]`. Triggers on "/ir:code-review", "review the diff", "review my changes", "review this branch", or when `ir:exec` reaches its review gate.

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

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

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

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

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

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