/review:quality-gate [self|code|code-design|architecture|security|spec|close-out|downstream|pr…] [--unattended]from review
Routes code reviews through single-lens checkpoints (self, code, security, architecture, spec, etc.) with git context. Use for structured review of changes against specs or plans.
Ships in 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.
Read when SKILL.md points to them.
Arguments. [self|code|code-design|architecture|security|spec|close-out|downstream|pr…] [--unattended]; the full set ends pr|criteria|slice|restatement]. spec takes [--spec <path|id>], close-out takes [--container <id>] [--dry-run], and slice takes <name>. Every mode also takes the phase-boundary inputs [--worktree <path>] [--base <sha>] [--quality-bar <prototype|internal|production>] [--report-only] ("Shared inputs"). --unattended says no person drives the run, so no Native step runs.
Run each command below as its own Bash call, all sent together in one message (worktree isolation).
Keep any bound in the command's own pipe (output limits).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never ## Pre-computed context lines (gather-block convention).
git branch --show-currentgit status --porcelain | head -20With --worktree <path>, run both as git -C <path> ... ("Shared inputs").
Review is the quality checkpoint between "code works" and "code is ready." This skill structures that step so changes are inspected for consistency, correctness, and alignment with the project's conventions before verification or PR creation. Self-review catches errors tests miss. Inconsistencies, loose ends, convention drift, design shortcuts. Delegated reviews (code, architecture, security) bring specialized scrutiny the implementer's tunnel vision would miss.
Depth, not breadth. This skill picks one lens per invocation. For a multi-surface fan-out that runs many reviewers at once and ranks their combined findings, use this plugin's fanout skill instead.
--worktree, --base, --quality-bar and --report-only let an
orchestrator review a phase diff in a worker's worktree. Their table, the base-SHA pre-flight and
the reviewer's brief are in context/phase-boundary.md; read it
whenever any of them is passed. A base SHA overrides the ladder below: with --base, no
pull-request lookup, fetch or remote read runs.close-out does not use this base at all.
A spec container is not a branch, so that mode derives a container-scoped basis of its own, per
execution shape (context/close-out.md "Why it needs its own diff basis").
Every other mode uses the base below. When an open PR exists for the branch, its baseRefName is the base: dispatched reviewers diff git merge-base origin/<baseRefName> HEAD. Find it with /source-control:pull-request list --head <current-branch> (if enabled), invoked via the Skill tool, or the forge's own list of open PRs by head branch otherwise. One row gives the base; an empty array means no open PR. A failed read is not "no PR": the base is unresolved, so stop and report it rather than substitute another base. With no PR, git merge-base origin/HEAD HEAD (falling back to the remote's resolved default branch via git ls-remote --symref, then origin/main; when none yields a merge-base the base is unresolved, never HEAD) so committed-clean branches still show their changes; untracked files come from git ls-files --others --exclude-standard.${CLAUDE_PLUGIN_ROOT}/context/severity.md.${CLAUDE_PLUGIN_ROOT}/reference/standards-contract.md (its "Resolution ladder" section owns the procedure), detailed in context/criteria.md.self, code, code-design, pr, slice, and criteria given --base or --worktree) applies the bundled criterion context/loosened-check.md. It always applies; consumer criteria apply in addition. Before the first dispatch, resolve its settings with node "${CLAUDE_PLUGIN_ROOT}/scripts/loosened-check-settings.mjs" --root <repository root> --ref origin/<default> --verdict-option '${user_config.loosened_check_verdict}' --patterns-file <memory_dir>/reviews/<branch-slug>/loosened-check-patterns.json --spec-issue <number of the issue the change resolves> (first write that file, in the "Findings location" below, with the Write tool, its content exactly ${user_config.loosened_check_patterns}, so the free-form value never passes through a shell; omit --spec-issue when no issue is known; when the run fails and the patterns option is not empty, run it once more without --patterns-file so the repository's entries still apply, and say the user's entries were dropped), the default branch checked and fetched as for downstream_probe (context/downstream.md), and put its three value lines in every brief. The code-reviewer agent reads the criterion on its own; a review:brief-reviewer brief lists it as a file to read. Every brief hands the reviewer the two texts that can give a loosening its reason, each quoted as data: the text of the issue the change resolves as the spec, only when the run's loosened_check_spec: line says counts (a trusted person wrote the issue), otherwise no spec; and, when the change has a pull request, the ## Loosened checks section of its body (gh pr view <number> --json body), which gives a reason for an ordinary check only. Never the rest of the body, and never a plan the change's author wrote.<memory_dir>/reviews/<branch-slug>/, never committed. <memory_dir> is .work/ unless the project's instructions declare another memory root. <branch-slug> is the branch name lowercased, with / and every other non-[a-z0-9._-] character replaced by -. <UTC-timestamp> is date -u +%Y%m%dT%H%M%SZ. The session's first write verifies the memory root contains a .gitignore with *, creating it (announced) when absent; never edit the consumer's root .gitignore. Durable findings are <UTC-timestamp>-<mode>.md in that directory. Write repo-relative paths only, never absolute machine paths. Under --report-only no artifact is written.review:code-reviewer or review:security-reviewer follows ${CLAUDE_PLUGIN_ROOT}/reference/reviewer-handback.md: pass a findings path under the findings location, then read the report from that file, not from the reply. Under --report-only pass no path. That path is the reviewer's own file, not the gate's artifact: name it <UTC-timestamp>-<agent>.md (code-reviewer or security-reviewer, never the mode; <UTC-timestamp>-<agent>-<n>.md when that name is taken) and pass it absolute in the dispatch prompt, as that file says; the reviewer refuses a file name of any other shape.$ARGUMENTS, optional mode selector. When given, use it directly; otherwise infer:
| Signal | Mode | Context file |
|---|---|---|
| Just finished implementing, "review my work", bare invocation with uncommitted changes | self | context/self.md |
| "review the code", "code review" | code | context/code.md |
"code-design review", one fact copied into several files, one change cascading across files, a plan phase tagged Review: code-design | code-design | context/code-design.md |
| "architecture review", new modules, cross-cutting structure | architecture | context/architecture.md |
| "security review", auth/input handling, API endpoints | security | context/security.md |
"does this match the spec/issue/plan", "did we build what was asked", scope-creep check, spec [--spec <path|id>] | spec | context/spec.md |
"close-out review", "review the container", "did the whole spec ship", a spec container whose last sub-item just closed, close-out [--container <id>] [--dry-run] | close-out | context/close-out.md |
| "what could this break", "blast radius", "what else does this touch", "who calls this", a contract/signature/serialization change | downstream | context/downstream.md |
"review the PR", a PR exists for the branch (unchecked with --base) | pr | context/pr.md |
| "review criteria", "what should I check" | criteria | context/criteria.md |
slice <name>, "review testing", "review concurrency" | slice | context/per-slice.md |
| "restatement review", "SSOT drift", markdown-heavy diff | restatement | context/restatement.md |
Ambiguous → present the modes and ask. Read the matching context file before proceeding.
Downstream probe setting. downstream mode reads one setting, downstream_probe (run or
report, default run). The user's option is ${user_config.downstream_probe}; a literal,
unexpanded placeholder means unset. It is a policy floor: report from the user option or from
the repository's docs/conventions/review.yaml, read from the default branch, wins. The resolution
steps and the probe are in context/downstream.md ("Resolve
downstream_probe" and Step 2); keys and level rule:
${CLAUDE_PLUGIN_ROOT}/reference/config.md.
Mode-scoped by design. criteria is a reference mode that loads criteria and runs on a clean tree,
so it is exempt, except under --base or --worktree (context/phase-boundary.md).
close-out is gated, but on its own basis, not this one: it runs the same two checks below
against the container-scoped basis it derives, plus a rollup check that the container is actually
finished (context/close-out.md "Step 4"). Every remaining mode consumes the
branch review diff, so for those: resolve the review diff base ("Shared inputs") and confirm it
yields a non-empty diff before dispatching any reviewer. With --base, the checks run against that
SHA as context/phase-boundary.md "Pre-flight with a base SHA" says.
origin/<baseRefName> fails git rev-parse --verify even
after a fetch (do not silently substitute a different base. That reviews the wrong diff), or no
ladder ref resolves at all → report which ref failed and stop.Untracked-only is reviewable here, and this is a deliberate divergence from fanout. This
skill's Shared inputs hand untracked files to the dispatched reviewer directly ("Shared inputs";
the self and slice worker templates both read them), so a branch whose whole change is new
files has a real change set. Stopping on it would make a new-module or new-test review report
"nothing to review" about work that is plainly there. fanout stops on that case because its
surfaces receive only the merge-base diff, which cannot show an unstaged file. Review the untracked
files in place; still never git add them.
Either outcome dispatches zero reviewers: a lens run against an empty or wrong change set produces
noise, not a verdict. Two modes add a gate of their own on top of this one: an explicitly passed
--spec ref that does not resolve is a stop (context/spec.md "Rung 1"), and so
is an explicitly passed --container ref that does not resolve
(context/close-out.md "Step 1").
In self and code modes, when the bundled code-review skill resolves in this session, Step 2
invokes it as a first pass before the mode's own reviewer runs, then folds its findings into the
same report. We never let it replace that reviewer, which grounds in the project's standards, and
this skill's report-only contract and severity vocabulary still apply. One call per run, with an
explicit effort level (high), never max or ultra, and never --fix, --comment or --post.
Target: on a clean tree, the revision range <review diff base>..HEAD; with uncommitted changes,
no target, and the result block says so. Before invoking, read the pointers in
reference/native-surfaces.md for what the skill reviews, which
arguments edit or post, and how a target and an effort level are read.
Identity check. The name is in the skill listing; the description is advisory. A description that reads as a different surface is a likely user or project shadow: skip with a warning. A name listed with no description is invoked with the warning "identity confirmed by name alone".
Findings. The native pass may finish in the background; wait for its findings before Step 3.
Verify each against the diff like any delegated finding, merge duplicates with the reviewer's, and
mark the survivors native in the Category column. A finding the reviewer also raised keeps the
reviewer's severity.
Skip report. When the step does not run, the state names why: did not resolve in this session, invocation refused (the reason, never retried), identity mismatch, or a phase-boundary
input (--worktree, --base, --report-only): we run the native pass only on the session's own
branch.
Result block. The Step 3 report opens with this block, whichever state the step ended in:
Native step: code-review
State: ran | did not resolve in this session | invocation refused (<reason>) | identity mismatch | skipped (phase-boundary input | unattended | mode)
Target: <range> | default scope (uncommitted changes) | none
Findings kept: <n> of <m>
--unattended: never invoke code-review; the mode's reviewer runs alone, and the result block
records State: skipped (unattended).
In security mode, when the plugin-backed security-review command resolves in this session,
Step 2 runs it as a first pass over the session's own branch, then dispatches the
security-reviewer agent as context/security.md says and folds both into
one report. We pass it no argument, and the step is skipped under any phase-boundary input; before
invoking, read its pointer in reference/native-surfaces.md for
what it reviews.
The identity check, the findings handling, the skip report and --unattended are those of the
code-review step above; the result block reads Native step: security-review, with
Target: current branch or none. A whole-repository or threat-model-depth scan is not this
step's job: context/security.md "Deep-scan escalation" routes it to
/claude-security:claude-security (if enabled).
spec and close-out this is background for judging the change; making the goal the thing under judgment is spec mode, which owns the spec-source discovery ladder and the fidelity finding classes. close-out is that same lens at container scale, reusing both and resolving its spec from the container instead of the branchIn self, code and security modes, start the matching Native step above first, then follow the
selected context file. Two hard rules:
## Review: [mode] — [branch or task name]
### Findings
| # | Severity | Confidence | Category | Finding | File:Line | Action |
|---|----------|------------|----------|---------|-----------|--------|
### Strengths
- What is done well — review should validate, not only criticize
### Verdict
- [ ] Ready to proceed — no blocking findings
- [ ] Needs fixes — N findings require attention
In an attended run, when the built-in ReportFindings tool resolves in this session, also call it
once with the verified findings, most severe first (an empty list when none survived). The report
above stays the record; never call it under --unattended or in CI.
self mode. In a review-fix round, change exactly the lines each finding names (a finding that names a class names every instance of it in the diff); any other edit needs its own finding first. Unscoped edits made while fixing are where later rounds' defects come from, so the round stays bounded by its findingspr mode. End with the /ultrareview line in the second Boundary section belowecosystem-specialist agent) separately. One exception: downstream mode, under downstream_probe: run, runs the single probe it writes for its safety fact (context/downstream.md Step 2). That probe runs none of the reviewed code; the shared rule for running reviewed code, and why the probe sits outside it, is run-reviewed-code.md "The downstream probe is outside this rule"fanout skillThe context/ files write the plugin's root directory as <plugin-root>, which is
${CLAUDE_PLUGIN_ROOT}. Put that path in place of the placeholder before running a command or
writing it into a brief. Those files arrive through the Read tool as plain bytes, so a ${…} token
in them would reach the Bash tool unsubstituted, and the Bash tool's environment has no
CLAUDE_PLUGIN_ROOT to expand it from. Basis: the plugins reference,
https://code.claude.com/docs/en/plugins/manifest-reference#where-each-variable-resolves, verified
2026-10-07; recheck when that table adds supporting files to where a ${…} reference resolves.
code-review skill and the plugin-backed security-review commandTwo native Claude Code surfaces review the same change as code, self and security modes:
code-review (bundled skill): a native review of a diff; what it reads and which arguments
edit or post are in the pointer records.security-review (plugin-backed built-in): a native security review; what it reviews is in
the pointer records.REVIEW.md and subscribed standards layers, report-only, with verified findings
in one severity vocabulary.Routing. When either native surface resolves in this session, the matching Native step runs
it first and this skill's reviewer still runs. A request for a review with no project grounding
and no gate report can go to /code-review or /security-review directly. A whole-repository
security scan goes to /claude-security:claude-security (if enabled).
Mutation gate. We pass code-review an effort level and a target only, never --fix,
--comment or --post, and security-review nothing; before invoking, read the pointer records
for which arguments edit or post. A person who wants an edit or a posted review runs /code-review
themselves.
Availability is never assumed. This section states what to do when a native surface resolves, never that it is present. The pointer records live in reference/native-surfaces.md.
/ultrareview, ReportFindings and claude-security/ultrareview (built-in command): a deeper bug review of the branch, run by the person as
/code-review ultra; records in reference/native-surfaces.md.ReportFindings (built-in tool): renders a typed findings list in the host UI; Step 3 says
when the gate calls it.claude-security (marketplace plugin): its attack surface analysis proposes changes that
shrink what an attacker can reach; context/security.md names it.Native suggestions are on unless native_suggestions resolves off: the team docs/conventions/review.yaml value, read by ${CLAUDE_PLUGIN_ROOT}/skills/setup/scripts/setup-apply.mjs --check as config.md "Resolution" says, wins over the per-user value ${user_config.native_suggestions} (a literal unexpanded token means unset); with none set they are on. A value other than on or off is named and that layer dropped: a valid higher layer still wins, otherwise on, never a lower layer's value. When off, skip the sentence below and write nothing in its place, not even a note that it was skipped or why.
Routing. In pr mode: If /ultrareview is available in your session (gate basis: account and
provider requirements in reference/native-surfaces.md) and native suggestions are on (native_suggestions, Configuration), run /code-review ultra for a deeper bug review of this branch; it draws on the
plan's limited ultra runs (ultrareview: pricing and free runs).
Under --unattended, write Withheld suggestion (unattended): /ultrareview instead and do not ask.
Mutation gate. This skill never starts /code-review ultra, /ultrareview or a Claude
Security job; only the person's own run does.
criteria mode is a reference, not an action. It loads review criteria so you can see what to check; combine with self mode for an informed review.context/architecture.md (opens in a new tab)context/close-out.md (opens in a new tab)context/code-design.md (opens in a new tab)context/code.md (opens in a new tab)context/criteria.md (opens in a new tab)context/downstream.md (opens in a new tab)context/loosened-check.md (opens in a new tab)context/per-slice.md (opens in a new tab)context/phase-boundary.md (opens in a new tab)context/pr.md (opens in a new tab)context/restatement.md (opens in a new tab)context/security.md (opens in a new tab)context/self.md (opens in a new tab)context/spec.md (opens in a new tab)evals/evals.json (opens in a new tab)evals/fixtures/review-downstream-probe-invalid.yaml (opens in a new tab)evals/fixtures/review-downstream-probe-report.yaml (opens in a new tab)evals/fixtures/review-downstream-probe-run.yaml (opens in a new tab)reference/native-surfaces.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
bashThree short reads, in order
npx claudepluginhub melodic-software/claude-code-plugins --plugin review9 skills in this plugin
/code-reviewCI code review (`/review:code-review`)CI code-review lane for a GitHub PR: high-signal correctness and maintainability criteria (excludes security if a dedicated lane exists). If bundled code-review resolves in this session, prefer it for local diff/PR passes. Use when: 'CI code review', 'claude-review lane', '/review:code-review', or a reusable workflow invokes the org command./councilCouncil review (`/review:council`)Council review: a panel of configured members (provider, model, brief, effort) chosen by paths, size, or merge risk writes one ranked findings report, with optional /review:fanout fix rounds stopping on a checkable condition. Use when asked for 'council review', a multi-model panel review, or a cross-vendor second opinion./explain-changeOther plugins' skills for the same job