afk-claude-review: Part of the afk pipeline. Independent read-only Claude review, a fallback role when Claude did not implement the change. Triggers include "/afk-claude-review", "run claude review", "claude gate".
Ships in afk-skills. 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.
Read AFK environment before resolving
configuration, local state or bundled helper paths.
Before invoking this gate, read external review
and review convergence. They own role
selection, authorship declaration, admission, repair allowance and closure.
Before supplying context/receipts or reusing receipts, read
review evidence. Before --design, read
external design review.
Reuse only the same installed revision already read and still in context;
otherwise reread it. Apply these routes for standalone invocations too.
For standalone review, run only the requested gate and return its verdict. Follow external review for the distinction between standalone invocation and driver-managed AFK sequencing.
Per-run --model <alias-or-id> and --effort <level> override
CLAUDE_REVIEW_MODEL and CLAUDE_REVIEW_EFFORT independently. The shared
../../lib/gate/model-select.mjs expands explicit opus, fable, sonnet,
and haiku aliases to pinned IDs; environment model values still require full
IDs. Efforts are low, medium, high, xhigh, and max. Defaults are
claude-opus-5-5 and high; --print-args reports the effective selection.
Response identity verification still applies after alias expansion.
In driver-managed AFK, Claude is an independent fallback external role
after afk-internal-review; it is the default outer fallback when Codex is the
implementer. Run the ordered roles required by .afk/config.md, and never use a
reviewer whose model matches the implementer or another role.
This gate exists for the case where Claude is not the implementer — Codex,
Kimi, GLM, DeepSeek, MiMo, Gemini or Copilot wrote the change and Claude reviews
it. It refuses to run otherwise (see Independence below). In driver-managed AFK, an ineligible Claude role
self-skips and the next gate in priority takes its place. A standalone invocation
reports the requested gate's skip and returns.
The helper claude-gate.mjs ships with this skill and travels with the plugin.
The gate resolves who wrote the change and skips if the answer is Claude:
--implementer <family> — per invocation. The only source that may permit a
run as well as block one.implementer: in .afk/config.md — may only block. A per-repo file
written once must not outrank a live per-run signal.CLAUDECODE in the environment — set by Claude Code in every process it
spawns. Present and undeclared means the driver, and so probably the
implementer, is Claude.An unrecognised implementer value fails closed: the gate skips rather than guess that it is independent.
Pass --implementer <family> whenever the implementer is not the driver — most
often when afk-agent-relay relayed the implementation to another model. In
design mode the flag names the design's author, not the code implementer (see
"Run it"). Known families: claude, codex, kimi, glm, deepseek, mimo, gemini, copilot.
Known gap: CLAUDECODE identifies the driver, not the model. A Claude
implementer driven from Copilot, Cursor, CI, or a plain terminal leaves it
unset, so the gate would run. Close it with --implementer claude or an
implementer: claude line in .afk/config.md.
claude, default when installed): loads Read,
Grep and Glob and nothing else — no Bash, no Write, no Edit. It is
read-only by construction rather than by an allowlist, so there is no command
list to maintain and none to get wrong.agy) backend: uses --mode plan --sandbox and a prompt
prohibiting file writes, plans/artifacts, subagents, and swarms (the same
shared runner as afk-gemini-review). Read-only is not enforced by
construction on agy, and agy may keep conversation/plan state under
~/.gemini/antigravity-cli/. Prefer the native claude CLI where both
qualify unless the operator selects agy.Because the reviewer has no shell, the gate pre-injects the diff and its stat
into the prompt; the reviewer uses its read tools for anything the diff does not
answer. This is the gate's advantage over afk-glm-review, whose reviewer is
limited to the snapshot it was sent.
claude-gate.mjs supports two transports for the single claude model family:
the native Claude Code CLI (claude) and the Antigravity CLI (agy). Both
back the same claude role — neither can review Claude-authored code, and they
never occupy two separate roles in one run.
Resolution order (pure local presence; never reads credential files):
Per-run --backend <claude|agy> (does not mutate machine preferences).
Environment variable CLAUDE_REVIEW_BACKEND=claude|agy (does not mutate
machine preferences).
Explicit single-backend binary override (CLAUDE_GATE_BIN or
CLAUDE_AGY_BIN, trimmed non-empty).
Persisted machine-level preference (~/.config/afk/preferences.json, or
XDG_CONFIG_HOME / Windows APPDATA, overrideable via
AFK_MACHINE_PREFS_PATH — always outside the plugin root and repository).
Local executable presence on PATH: only claude -> claude; only agy ->
agy; both present with no saved default -> exits non-zero (ERROR)
requiring an explicit choice. Ask the operator once which backend should be
this machine's default and persist it with:
node "<plugin-root>/lib/gate/machine-prefs.mjs" --set claude-backend <claude|agy>
Subsequent runs on this machine follow that saved choice automatically unless
overridden for a single run with --backend <claude|agy>.
No silent cross-backend fallback: if the active backend skips due to rate
limits, quota, missing sign-in, or model unavailability, the gate emits
SKIPPED without invoking the other backend and notes when the alternative CLI
is installed. In interactive sessions, ask the operator whether to pass
--backend <other> for this run, update the machine default, or fall back to
the next family in priority. In unattended AFK runs, never silently switch
billing channels.
Metered like any external gate. Batch minimal admitted P1 fixes into one content pass, self-review, then re-run once. Record every other disposition together at the end without editing a clean revision.
Read review evidence before using
--review-context, --review-phase or --review-receipt.
Use --print-prompt to inspect the supplied section before a provider call.
Required history is validated and never silently truncated.
The bundled helper claude-gate.mjs sits beside this SKILL.md. Read environment to resolve its sibling
helper directory and bootstrap when needed.
node "<helper-dir>/claude-gate.mjs"
Run it in the background with a generous timeout; redirect stdout to a file
and read it when it completes. Pass through any target flag (--base <branch> /
--commit <sha> / --uncommitted). Do not poll in a sleep loop.
Read authorship declaration
before choosing --implementer; design mode names the design author.
Add the flag only when that other model actually produced the artifact under review — it can permit a run as well as block one (Independence above), so a value copied in from an example defeats the self-skip this gate exists for.
The review is bounded by CLAUDE_REVIEW_TIMEOUT_MS (default 15 min), with
AFK_REVIEW_TIMEOUT_MS as the shared fallback. A timeout is a non-zero ERROR,
never a partial verdict; it follows the role's transient retry rule.
Design mode (--design <path>) reviews a design document's reasoning instead
of a diff — the opt-in design-stage gate (read external design review). The reviewer keeps its read-only Read,Grep,Glob tools, so it
can check whether the code says what the design claims. A missing or unreadable
--design path fails loudly (ERROR, non-zero), never a skip.
Read the verdict between the ===== CLAUDE REVIEW (final message) ===== markers. Treat only column-0 marker lines as markers; the last END marker wins.
A SKIPPED: … line is not a failure — record it and continue per the afk
gate-selection rule. The reasons are distinct on purpose, so the ledger can tell
"correctly declined" from "could not review":
SKIPPED: independence check — … — the gate refused to review Claude's own
work. Correct behaviour; use another gate.SKIPPED: Claude gate disabled via CLAUDE_REVIEW_GATE.SKIPPED: Claude CLI not installed …SKIPPED: Claude not authenticated (HTTP 401) …SKIPPED: Configured model "…" is unavailable (HTTP 404) …SKIPPED: Claude is rate-limited or out of quota (HTTP 429) … — the
selection rule treats a rate-limited reviewer as unavailable; the next gate
in priority takes its place.SKIPPED: No changes found for …An ERROR: … line with a non-zero exit means the gate ran and could not produce
a verdict; that is not a clean round.
Apply review convergence before triage,
repairs or re-review. Keep the issue's current finding record and allowance;
apply consuming .afk/config.md invariants as extra must-check lenses.
Use the canonical closure and stop rules to decide whether this revision earns the role stamp.
Report CLEAN, or OUTSTANDING with what remains. A clean pass is not
authority to merge.
Optional and self-skipping. Supports either:
claude): install and log in with your Claude
subscription (no API key).agy): install and sign in once by running agy (uses
the Claude models offered to your Antigravity account; run agy models to
check). On agy, effort is composed into the wire model ID (default
claude-opus-5-5-high), only pinned claude-* IDs are accepted, init.model
must match, and delegation steps are rejected.Needs Node 20+ and git on PATH. Disable with CLAUDE_REVIEW_GATE=off.
Config knobs:
CLAUDE_REVIEW_BACKEND (claude | agy) — override the backend for the
current shell/run without mutating machine preferencesCLAUDE_REVIEW_MODEL (default claude-opus-5-5; composed with effort on agy, e.g. claude-opus-5-5-high)CLAUDE_REVIEW_EFFORT (default high)CLAUDE_REVIEW_MAX_CTX_BYTES (default 400000)CLAUDE_GATE_BIN — override the resolved claude binaryCLAUDE_AGY_BIN — override the resolved agy binary for the Claude gateAFK_MACHINE_PREFS_PATH — override the machine-level preference file pathNo fallback model is passed: a quiet downgrade to a weaker reviewer is a quality regression with no visible symptom, so an unavailable model surfaces as a skip.
CLAUDE_REVIEW_MODEL must be a full model ID. An alias (opus, sonnet) is
resolved by the host and can select an older generation without a symptom —
--model opus answered as claude-opus-4-8 while the pipeline required a
current generation — so an alias is refused before any call is spent.
The gate then reads modelUsage in the result envelope and requires the
requested identity to be present; a dated snapshot of the same model satisfies
it, and the auxiliary models a normal run also bills are ignored. A review whose
envelope names another generation, or names nothing, is discarded with an
ERROR rather than attributed to a model that may not have run. Neither case is
a clean round:
ERROR: cannot review — CLAUDE_REVIEW_MODEL "…" is an alias …ERROR: reviewer identity unverified — requested "…" but …What SKILL.md sets; muted values are Claude Code's defaults
/afk-skills:afk-claude-reviewfrom afk-skills
npx claudepluginhub alvinshenssw/afk --plugin afk-skills13 skills in this plugin
/afkafk: Part of the afk pipeline. Execute an operator-supplied, pre-reviewed issue/PR scope autonomously through the full pipeline. Requires explicit scope; never pick tracker work. Triggers include "/afk", "AFK mode", "go AFK on …"./afk-agent-relayafk-agent-relay: Part of the afk pipeline. Development-time context compression and raw-request scoping through external models. Triggers include "/afk-agent-relay", "compress context", "relay brief", "scope this"./afk-codex-reviewafk-codex-review: Part of the afk pipeline. Independent read-only Codex review, the default outer role when eligible. Triggers include "/afk-codex-review", "run codex review", "codex gate".Other plugins' skills for the same job