/revizorro:revizorrofrom revizorro
Run a local pre-merge code review of the current worktree diff in VS Code. The agent opens the review form, then drives a blocking event loop — answering questions, addressing comments, and re-submitting after fixes — until the human approves or the loop is cancelled. Triggers on "review my changes", "revizorro", "review the worktree before merge", "отревьюь ворктри".
Ships in revizorro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You drive a human review of the current worktree diff. The VS Code extension
hosts a long-lived review form; the revizorro CLI is your blocking interface to
it. Each revizorro review call blocks until exactly one review event, prints
it as JSON, and exits. The form stays open across calls — the output ending is
your turn to act, not the form closing.
revizorro is on PATH (npm i -g @revizorro/cli).You may run from any terminal — the review window is separate. The CLI finds a
host via the global registry (~/.claude/revizorro/hosts/) and sends this
project's path, so the chosen window reviews THIS worktree regardless of which
folder it has open. The form appears in that window.
One window holds one review per worktree, each in its own tab. A second session reviewing another worktree opens its own tab beside yours and does not disturb your round — so a tab you did not open is a colleague's review, not yours being taken away.
If revizorro review exits with no revizorro window found …, ask the user to
open a folder in VS Code with the extension active, then retry. Dead/closed
windows are skipped and cleaned up automatically.
Start a round:
revizorro review --worktree
It blocks. When it returns, parse the single JSON event from stdout. The event reports its own timings — how long the call waited, and how long the round has been open — so there is never a reason to time the command yourself.
Reviewing before a commit — the default. When the work is ready to commit, stage exactly what belongs in that commit and review the staged change first:
git add <the files for this commit>
revizorro review --staged-only
--staged-only baselines against HEAD, so the human sees only what is about to
be committed — not the commits already on the branch. Commit only after the
review comes back approved. Keep the flag on every call of that round
(--push included) so the diff does not flip mid-review.
Reviewing a whole branch. Without --staged-only the review covers the
branch against its target: every commit since the fork point plus the dirty
worktree. Use this for a deep review of the finished branch.
Choosing the target. The target branch is auto-detected (origin/HEAD,
else main/master). When the branch targets something else — a release
branch, a stacked branch — say so explicitly, or the review will show unrelated
work:
revizorro review --worktree --base develop
Branch on event.type:
question { threadId, file, side, range, body } — the human asked you
something about a specific line range (side is "old" for a deleted line,
"new" for added/context). Compose an answer, write it to a push file, and
re-enter the form (the form stays open):
# write {"replies":[{"threadId":"<id>","body":"<your answer>"}],"comments":[]}
# to $CLAUDE_JOB_DIR/tmp/revizorro-push.json (or a temp file)
revizorro review --push "$CLAUDE_JOB_DIR/tmp/revizorro-push.json"
Then loop back to step 2 with the next event.
comment { threadId, file, side, range, body } — a passive comment. You
will not normally see one: comments the human leaves while reading no longer
wake you, and reach you inside the verdict instead. If one does arrive (an
older host), it is READ-ONLY — do NOT edit code and do NOT reply. Loop back to
step 2.
idle — the poll hit its ceiling. This is the normal heartbeat of a
review, not a fault. Re-arm:
revizorro review
Re-arm with NO scope flags: a bare call keeps reviewing whatever the round is
already showing, while --worktree would widen a staged-only review to the
whole branch.
idle carries inactiveForMs, and inactiveFor — the same span already
spelled out — for how long the form has gone untouched. Reading, expanding
context and marking files viewed emit no events, so this number, not the
number of idle events, is what tells you where the human is. Wait a
MINIMUM of ten minutes of it before reading anything into silence:
inactiveFor rather than
converting milliseconds — then keep re-arming silently.
Repeat it only if activity resumes and then stops again. Never end the
loop: Approve still unblocks you the moment they come back, and an
abandoned loop would leave them approving into a form nobody is listening
to.idle also carries a review snapshot — round, files, openThreads,
viewedFiles — which is proof the round is live. Watch viewedFiles climb if
you want to see progress. If that snapshot is missing across several idle
events in a row, THEN something is off and it is worth telling the user.
decision / approved — the human approved. Stop the loop. Proceed to
merge (or report ready-to-merge).
decision / changes_requested { comments: [...] } — NOW apply fixes
for every comment. Check verdict before you touch anything. A clarify
arrives carrying an identical comments array, so the payload cannot tell you
which of the two you are in — only the verdict field can, and editing code on
the wrong one is the single most expensive mistake in this loop. For each addressed comment, --push a reply into its
thread saying what you did (so the human can verify and mark it resolved) —
all of them in ONE push, not one call per comment.
Then start a NEW round, keeping the same scope (no flags):
revizorro review
Questions you asked that came back unanswered do not become permission to guess. Fix what is unambiguous; for the rest, reply in the thread saying exactly what is still undecided and what you would do by default, and leave the code alone. A wrong fix costs the human more than an unanswered question.
Unchanged files the human already marked viewed will be collapsed. Loop back to step 2.
decision / clarify { comments: [...] } — a conversation, NOT a work
order. Do not edit a single line of code here, however obvious the fix looks.
This event looks EXACTLY like changes_requested — same type, same
comments array — and the only thing separating them is verdict. If you
reached for the editor because the comments read like fixes to make, you have
misread the event: re-read verdict, put the file back, and answer instead.
Answer EVERY comment in the list, and where a request is ambiguous, ask back: name the options you see and say which you would pick. Silently guessing what the human meant is the failure this event exists to prevent. Put all the replies and questions into ONE push file rather than pushing them one at a time. The form stays open and marks each unanswered thread, clearing as your replies land.
After answering all, re-enter with revizorro review to wait for the human's
next decision. Loop back to step 2.
closed — the human closed the review tab without a verdict, so they
interrupted the review on purpose. Do NOT re-arm blindly, do NOT merge, and
do NOT keep working as if nothing happened. Stop and ask what to do, offering
exactly these three options:
revizorro review starts a fresh round in the same scope) and continue the loop.Ask in the language the user has been writing in: translate the question and the three labels into that language, keeping their meaning. Never answer in English to a user who writes in another language. Wait for their answer before doing anything else.
--push reads a JSON file matching the protocol PushPayload:
{
"replies": [{ "threadId": "t1", "body": "It narrows the union to the non-null branch." }],
"comments": [{ "file": "src/a.ts", "range": { "startLine": 12, "endLine": 14 }, "body": "Extracted into a helper." }]
}
replies answer existing threads; comments open new agent-authored threads on
the diff. Either array may be empty.
Answer every thread in ONE push. Both arrays take as many entries as you
like, each reply addressed by its own threadId, and they are applied together
in a single round-trip. Answering five questions with five --push calls costs
five blocking waits and leaves the human watching four threads sit unanswered
while you work through them one by one:
{
"replies": [
{ "threadId": "t12", "body": "Renamed it to `refreshTokens!`." },
{ "threadId": "t13", "body": "It cannot be null here — the column is NOT NULL." },
{ "threadId": "t14", "body": "Extracted into TokenRefreshable." }
],
"comments": []
}
Write every answer first, then push once.
A body is markdown rendered with raw HTML disabled. Draw a diagram as Mermaid
and nothing else, and always inside a fenced block tagged mermaid:
```mermaid
flowchart TD
A[SyncEntitiesAsync sets started_at] --> W[Worker lists one page]
W --> Q{NextPageToken}
Q -->|yes| W
Q -->|no| R[Archive rows not seen in this pass]
```
<br/> and other tags print literally. Keep each label
to one short line; split a long node into two nodes instead.json.dump) rather than shell-escaping the
backticks, so the fence reaches the JSON intact.```mermaid and ends
with ```. A missing or unclosed fence also swallows any text after
it into the block.question is the ONLY event you answer on your
own initiative. Every other action of yours waits for a decision: approved,
changes_requested or clarify. Comments piling up in the form are not a cue
to start fixing — the human is still reviewing, and the fixes they want arrive
as changes_requested.changes_requested. Fix, re-submit, and wait for approved.clarify, only answer and ask back — never edit code. Unanswered questions
are not permission to guess: on the next changes_requested, fix what is
unambiguous and say in the thread what is still undecided.approved, the review gate has passed — you may merge the worktree.closed, the human interrupted the review — ask them to choose between
re-running the review, committing as is, and chatting about it (in their own
language). Never merge and never silently re-loop.review, the next revizorro review returns that decision instead
of opening a new round — so an approval that arrived while you were busy still
reaches you.revizorro review. Scope flags belong on the call that
STARTS a review; repeating --worktree on every loop would widen a staged-only
review to the whole branch.waited (how long
that call blocked), age (how long ago the human acted) and, once a round is
open, reviewFor (how long the human has been on this round, measured from the
round's own start). Quote those. Do NOT time the command, do NOT subtract at
from the clock, and do NOT add up idle events to estimate how long the review
has run — a sum of poll ceilings is not a measurement.held: true says
the event waited in the queue while you were away, and age says how long it
sat there. A verdict whose waited is a fraction of a second is normal when
held is set and age is small — a real decision handed over the moment you
came back, not a stale replay. Trust it and act; do not ask the user to confirm
it. An age of many minutes on a verdict you did not just ask for is the one
case worth a second look: that is a replay from an earlier round rather than a
decision about the diff in front of you.--push (see Push-file shape), never one
call per thread.revizorro review --check is a cheap preflight: exit 10 means the diff has
something to review, exit 0 means it is empty. It touches no VS Code window, so
use it before opening a form on an empty change. It honours --staged-only
and --base.--staged-only, and commit once it is approved.revizorro review
for a merge, and do not treat a merge as an unreviewed change.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub artk0de/revizorro --plugin revizorro