$npx -y skills add Borda/AI-Rig --skill reviewMulti-agent code review of local Python files, directories, or the current git diff covering architecture, tests, performance, docs, lint, security, and API design. Scope: Python source files in local working tree. Python-file-free targets (pure JS/TS/Go/Rust projects) are out of
| 1 | <objective> |
| 2 | |
| 3 | Comprehensive code review of local files or working-tree diff. Spawns specialized sub-agents in parallel, consolidates findings into structured feedback with severity levels. |
| 4 | |
| 5 | NOT for: GitHub PR review (use `/oss:review <PR#>` (requires oss plugin)); GitHub thread analysis or PR reply drafting (use `/oss:analyse <PR#>` (requires oss plugin)); implementation (use `/develop:feature` or `/develop:fix`); `.claude/` config changes (use `/foundry:manage` (requires foundry plugin) or `/foundry:audit` (requires foundry plugin)); non-Python-only projects (zero Python source files — pure JS/TS/Go/Rust) — review toolchain assumes Python/pytest; Python test-only targets where diff contains only test files (no `src/` or top-level `.py` source outside `tests/`) — review will be uninformative; for polyglot projects with Python source, reviews Python files only. |
| 6 | |
| 7 | </objective> |
| 8 | |
| 9 | <inputs> |
| 10 | |
| 11 | - **$ARGUMENTS**: optional file path or directory to review. |
| 12 | - Path given: review those files |
| 13 | - Omitted: review current git diff (`git diff HEAD` — staged + unstaged vs HEAD) |
| 14 | - **Scope**: Python source only. Non-Python file (YAML, JSON, shell script, etc.) → state out of scope, suggest appropriate tool. No findings. |
| 15 | - `--no-challenge`: skip adversarial review (challenger runs by default) |
| 16 | - `--challenge`: force challenger (Agent 7) even on small diff that small-diff auto-skip would otherwise skip |
| 17 | - `--codemap`: strict mode — stop and report if codemap not installed (on by default when installed; use `--no-codemap` to opt out) |
| 18 | - `--semble`: enable semble semantic search companion (off by default) |
| 19 | |
| 20 | **PR#/filename disambiguation gate** (execute BEFORE Step 1): tighten classification — valid PR# is positive integer with no extension and no existing file at that path. Filenames that look like numbers (e.g. `42.py`) must NOT trigger PR mode. |
| 21 | |
| 22 | ```bash |
| 23 | TOKEN="$ARGUMENTS" |
| 24 | if [[ "$TOKEN" =~ ^[0-9]+$ ]] && [ ! -e "$TOKEN" ]; then |
| 25 | # bare positive integer, no extension, no existing path |
| 26 | echo "PR number detected — checking oss plugin availability" |
| 27 | [ -f "$(ls -td ~/.claude/plugins/cache/borda-ai-rig/oss/*/skills/review/SKILL.md 2>/dev/null | head -1)" ] && OSS_AVAILABLE=true || OSS_AVAILABLE=false # timeout: 5000 |
| 28 | elif [ -f "$TOKEN" ]; then |
| 29 | # valid path, even if numeric (e.g. 42.py) |
| 30 | OSS_AVAILABLE=skip |
| 31 | elif [[ "$TOKEN" =~ ^#[0-9]+$ ]] && [ ! -e "$TOKEN" ]; then |
| 32 | echo "PR number detected — checking oss plugin availability" |
| 33 | [ -f "$(ls -td ~/.claude/plugins/cache/borda-ai-rig/oss/*/skills/review/SKILL.md 2>/dev/null | head -1)" ] && OSS_AVAILABLE=true || OSS_AVAILABLE=false # timeout: 5000 |
| 34 | else |
| 35 | OSS_AVAILABLE=skip |
| 36 | fi |
| 37 | ``` |
| 38 | |
| 39 | If `$OSS_AVAILABLE` is `skip`: proceed to Step 1 normally (path / diff / dir mode). |
| 40 | |
| 41 | If `$OSS_AVAILABLE` is `true`: call `AskUserQuestion` tool: "Looks like you passed a PR/issue number. Did you mean to run `/oss:review $ARGUMENTS` (requires oss plugin) to review that PR?" Options: (a) "Yes — launch `/oss:review $ARGUMENTS`" → call `Skill(skill="oss:review", args="$ARGUMENTS")`; (b) "No — review local code" → call `AskUserQuestion` immediately: "Provide the file path or directory to review:" — use user's response as `$REVIEW_ARGS` and proceed to Step 1. |
| 42 | |
| 43 | If `$OSS_AVAILABLE` is `false`: call `AskUserQuestion` tool: "Looks like you passed a PR/issue number, but oss plugin not installed — `/oss:review` unavailable. Did you mean to review local code instead?" Options: (a) "Yes — review local code" → call `AskUserQuestion` again immediately: "Provide the file path or directory to review:" — use user's response as `$REVIEW_ARGS` and proceed to Step 1; (b) "I need oss plugin" → inform user: install with `claude plugin install oss@borda-ai-rig`. |
| 44 | |
| 45 | </inputs> |
| 46 | |
| 47 | <constants> |
| 48 | |
| 49 | CHALLENGE_ENABLED=true # set to false via --no-challenge |
| 50 | CHALLENGE_FORCED=false # set to true via --challenge — forces Agent 7 even on small diffs (overrides small-diff auto-skip) |
| 51 | CODEMAP_ENABLED=auto # on by default if codemap installed + index found; --no-codemap = off; --codemap = strict (stop if not installed) |
| 52 | SEMBLE_ENABLED=false # set to true via --semble |
| 53 | |
| 54 | </constants> |
| 55 | |
| 56 | <compaction> |
| 57 | |
| 58 | Key boundary: end of Step 3 — parallel review-agent fan-out outputs collected, before Step 5 consolidation. |
| 59 | Second boundary: end of Step 5 — consolidated report written, before Step 6 follow-up. |
| 60 | Preserve at boundary 1: RUN_DIR, REPORT_D |