# /review-minimax Skill **Purpose:** Delegate a first-pass code review of a git branch (agent-produced worktrees from mm-worktree-task, ralph, container agents) to a MiniMax M3 sub-session. The diff and context reads cost MiniMax tokens; only a findings file returns, which the operator adjudicates. A pre-filter before `/code-review` or an in-session review — never the final authority. **Location:** `custom-claude-skills/skills/review-minimax/` — thin wrapper over `review-minimax-run` (small-scripts), which owns all mechanics. ## Usage `/review-minimax [--profile agent-runtimes]` → runs: ``` review-minimax-run --worktree [--base main] [--profile agent-runtimes] ``` Findings land in `${XDG_RUNTIME_DIR:-/tmp}/review-minimax//-findings.md`. ## Key design points - **The wrapper materialises the diff itself** (`base...HEAD`, three-dot, with `:(exclude)` pathspecs for secrets/keys); the sub-session gets `Read,Glob,Grep,Write` only — no Bash, no Edit — so it can't run git, inherit the wrong branch, or modify the tree. A post-run `git status --porcelain` assertion catches any unexpected write (exit 2). - **Credential gate:** a diff matching credential patterns (`ghp_`, `AKIA…`, private-key headers, `x-access-token:` …) aborts with exit 1 — review in-session instead. - **Result gate:** findings need a `### [BLOCKER|SHOULD-FIX|NIT]` block plus at least one citation resolving against the worktree, or the literal `NO FINDINGS`; otherwise exit 3. - **Checklist is explicit patterns** (llm-code-security §10/§12 distilled), not "find problems" — MiniMax reasoning-loops on open-ended analysis. The 5 recurring MiniMax test-file bugs load only under `--profile agent-runtimes`. - **Exit contract** 0/1/2/3 mirrors explore-minimax-run; fallback on 2/3 is a Claude Sonnet subagent review. - **Adjudication is mandatory:** findings are untrusted data; spot-check 1–2 citations; `NO FINDINGS` does not certify the branch. ## Which modes use it `deep`/`deep-fable` post-agent-merge review, `orch` for reviewing container-agent branches before merge. Related: [[script-review-minimax-run]], [[skill-explore-minimax]], [[skill-ci-triage-minimax]]. ## Gotchas - Synchronous with a 540s internal timeout (harness Bash 600s cap) — the diff budget (`--max-diff-lines`, default 6000) keeps runs inside that; oversize diffs exit 1 rather than half-review. - `Write` must stay in the sub-session allowlist: without it MiniMax exits 0 and the findings file silently never appears (gotchas-minimax).