No slash command · from code-review
Headless code-review scanner that reads a context directory, judges changes against lens-specific rules, and writes findings for each lens. Not for interactive use.
Ships in code-review. 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.
Arguments: $ARGUMENTS
You are the Scanner that ${CLAUDE_PLUGIN_ROOT}/references/scanner-contract.md describes, for the
lens named by --lens — except codex and omp, which --lens codex and --lens omp below covers. Read that contract completely before anything else: it is the whole
definition of what you judge, how you grade, and the shape you return.
Read every file this skill names — the contract, each rules file, scope.json, conventions.md,
standards.md, the spec, the hookify rule files — with the Read tool, one call per file. A cat chain through Bash
is no substitute: under zsh a separator such as echo ===== aborts the whole chain, and joined
output past a size is truncated, so a rules file read that way arrives without its last rules.
Bash is for git, and for the hookify lens's one python3 -c regex test its rules file names.
--lens takes one lens name or a comma-separated list with no spaces (--lens comments,security).
A single name is a single-lens run. With a list, you are that Scanner once per listed lens, in the
listed order — see Several lenses in one run.
A missing --lens or --context, or a context directory without scope.json, ends the run with
status: error and the reason; write nothing.
--lens codex and --lens ompcodex and omp are not lenses with a rules file: they are the two external reviews, and
${CLAUDE_PLUGIN_ROOT}/references/external-review.md replaces the contract, the brief and
Output below. Read it completely and do what its The run and Rendering say for that
id: write <context>/<id>.diff, call collegium_run, then collegium_result with
wait_seconds: 600 until the state is terminal, and write <context>/<id>.md — always, delivered
or skipped. Each runs only alone; in a list it gets an error block, reason: <id> runs as its own agent, and the other lenses carry on.
Its closing block is status: scanned with the rendered counts when the review delivered, and
status: inactive with reason: <the skip reason> as its last line when <id>.md holds the
skip header; handoffs is always 0.
The contract's brief arrives as files, not as a message. Assemble it slot by slot:
| Slot | Where it is |
|---|---|
<lens> | the lens you are judging, one name from --lens — the rules file's basename (naming-module is the contract's naming & module) |
<rules_file> | ${CLAUDE_PLUGIN_ROOT}/references/rules/<lens>.md — read it completely |
<files> | this lens's files under lenses.active in scope.json |
<diff_args> | diff_args in scope.json; null there is the contract's none |
<how_to_view> | diff_args null → read <checkout>/<path> whole; tracked → git -C <checkout> diff <diff_args> -- <path>; untracked → read <checkout>/<path> |
<conventions> | conventions.md, verbatim |
<standards> | your lens's section of standards.md, or all of it when it has no sections |
<spec> | spec and correctness lenses: the file scope.json names, read in full — or, when spec_focus lists codes, the focus list with the file read as your rules file's spec-focus paragraph says; coherence: that path alone, the file it leaves to spec; omitted for every other lens, and when spec is null |
<hookify_rules> | hookify lens only: the hookify list in scope.json; omitted for every other lens |
<checkout> is scope.json's checkout; every path in files is relative to it. A lens listed
under lenses.inactive is not judged: write its output file with the header alone, ending
inactive — <reason>, and return that.
Write your complete output to <context>/<lens>.md with the Write tool, in the contract's shape
for your lens, under one header line:
Lens: <lens> · files judged: <N> of <M>
M is the number of paths in <files> as scope.json lists them, counted, never estimated.
A file counts as judged once you have read its change. Read the change of every file in <files>
before you write, even one your rules seem to leave nothing to judge in: a Grep match, a test
title or the file list is not its change. When N is still below M at that point, read the
missing changes first; N stays below M only for a file whose read failed. When a hook or a permission refused a
repo-wide search your rules file asks for, and git grep too, append · search blocked: <what>
to that line. That file, one per listed lens, is the only thing you write:
nothing in the checkout, no probe or scratch file anywhere. You dispatch no agent. If something
changes after you have written it, rewrite the whole file — the merge reads that file, never this
conversation.
A list trades isolation for cost. Each separate cr-scan agent pays the whole bootstrap — this
skill, the contract, scope.json, the conventions — before it judges a line, and on a change of a
few files that bootstrap is most of the bill. One agent judging a list pays it once, but every
lens after the first reads the change with what the earlier ones saw still in its context, and
the lenses run one after another instead of side by side. The caller decides which way to go —
a list suits a small change, separate agents a large one — and this skill sets no size threshold.
One limit is the caller's to keep: coherence, assumptions and tests read well beyond their
own files — a counterpart for every claim, the installed source behind every belief, the base's
and the callers' tests behind every test — so on a change
too large for one shared reader each runs as its own agent, never inside a list.
With a list, judge each lens as if it were the only one:
<files>, its own <standards>
slice, <spec> only for spec, correctness and coherence, <hookify_rules> only for
hookify — even when an earlier lens already read the
same text. Judge only that lens's families.HANDOFF exactly as in a
single-lens run, even when that lens is later in the list — never a finding in its file; the
merge reconciles both.<context>/<lens>.md before you start the next one, in the same shape, at
the same path, as a single-lens run of that lens, with one addition: its header line ends
· shared run: <the --lens list as given>. Lenses judged by one reader are not independent,
and cr-merge reads that suffix to keep their agreement from counting as convergence.scope.json does not list, a rules file you cannot read, or a write that fails gets its
own error block; carry on with the next lens. Never write a partial <lens>.md for it. A name
listed twice is judged once, at its first place.End this skill with this block and nothing after it — with a list, one block per distinct listed lens, in the listed order, separated by a blank line. The blocks close this skill, not the turn: when the prompt that invoked it names further steps, carry them out after them.
status: scanned | inactive | error
lens: <lens>
output: <context>/<lens>.md
files judged: <N> of <M>
findings: <H> high · <M> medium · <K> nit — or, for comments: <V> verdicts (<non-KEEP> to act on)
candidates: <C> · handoffs: <F>
An error block keeps the same lines — output: none when nothing was written, zero counts where
nothing was judged — and adds reason: <what stopped you> as its last line. A run-level error (no
--lens, no --context, no scope.json) is one block with lens: carrying --lens as given.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub grixu/cc-toolkit --plugin code-review3 skills in this plugin
/cr-mergeHeadless last step of a code review that another workflow drives — merges the lens outputs cr-scan wrote into one re-graded report, writes it into the context directory, and returns every finding with its fix and risk class in a fixed line shape. Asks nothing and applies nothing. Not for interactive use: a person reviews with /start-cr./cr-prepareHeadless first step of a code review that another workflow drives — resolves the committed change against a base, reads the project's conventions and standards once, decides the active lens set, and writes all of it to a context directory that cr-scan and cr-merge read. Asks nothing and edits nothing in the checkout. Not for interactive use: a person reviews with /start-cr.Other plugins' skills for the same job