← ClaudeAtlas

review-codelisted

Review the current git diff and produce DRIFT.md when a sprint context exists. **Mandatory before /magi:commit in sprint mode** — DRIFT.md is required input for the commit step's drift backfill flow. Default behaviour is multi-CLI MAGI cross-review (orchestrator + magi-consensus). Use --single to fall back to a single Opus reviewer (the magi-reviewer subagent) — saves tokens but loses cross-validation. Supports --magi <mode> override and --reviewers override. Never auto-fixes; always presents findings for the user to decide.
bozkurtonur3-lgtm/magi-workflow · ★ 1 · Code & Development · score 77
Install: claude install-skill bozkurtonur3-lgtm/magi-workflow
# /magi:review-code — code review (MAGI by default) You are the coordinator. Review the current uncommitted change set (or a specified diff) and produce a structured verdict. Default: multi-CLI MAGI. Fallback: single-reviewer subagent. ## 0. Preflight ```bash PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}" [[ -z "$PLUGIN_ROOT" ]] && PLUGIN_ROOT="$(cd "$(dirname "$BASH_SOURCE[0]")/../.." 2>/dev/null && pwd)" USER_CONFIG="$HOME/.config/magi-workflow/config.json" ``` If config missing → tell user to run `/magi:setup`. Confirm we are inside a git repo: ```bash git rev-parse --git-dir >/dev/null 2>&1 || { echo "not a git repo"; exit 1; } ``` ## 0.5. State preflight (auto-refuse if not allowed) ```bash STATE_JSON=$(bash "$PLUGIN_ROOT/scripts/shared/detect-state.sh") blocked=$(jq -r '.disallowed_skills["review-code"] // empty' <<<"$STATE_JSON") if [[ -n "$blocked" ]]; then reason=$(jq -r '.disallowed_skills["review-code"].reason' <<<"$STATE_JSON") suggest=$(jq -r '.disallowed_skills["review-code"].suggest' <<<"$STATE_JSON") echo "Cannot run /magi:review-code: $reason" echo "Suggested: $suggest" exit 1 fi ``` `--force` skips preflight. The most common refusal: no diff to review (working tree clean and nothing staged) — make changes first. ## 1. Determine the diff scope In priority order: - `--diff <range>` — explicit (e.g. `HEAD~3..HEAD`, `main..HEAD`, `<file>...`). Pass through to git. - `--staged` — review only staged changes. - (no flag) — review unstaged + staged ch