debate-review — скилл для Claude Code: двухмодельная рецензия PR
Два ИИ-обозревателя спорят перед тем, как оставить комментарий на PR или MR. Один ищет проблемы, второй их оспаривает или добавляет свои, потом первый принимает окончательное решение. Рецензия постится как встроенные комментарии или вывод.
npx skills add amElnagdy/review-skills --skill debate-review -a claude-codeЧто делает debate-review
Вы запускаете одну команду, а скилл оркестрирует две независимые сессии — основного обозревателя и возражающего. Основной находит проблемы в диффе. Возражающий пытается их опровергнуть и может добавить свои наблюдения. Потом основной делает итоговый выбор, и одна рецензия с встроенными комментариями приземляется на PR, MR или выводится в консоль.
Скилл работает с GitHub (gh), GitLab (glab) и Azure DevOps (az), постит от вашего аккаунта, но никогда не одобряет и не просит правок — только замечания. Можно запустить на существующий PR/MR по URL или номеру, или на локальную ветку без PR (--local). Для Azure DevOps рецензия это несколько потоков встроенных комментариев плюс закрытый итоговый поток.
Требует Node 18+, Git 2.31+ для Azure DevOps и дополнительный скилл delegate-skills для двух полос обозревателей. Выбирайте для них разные реализации — спор имеет смысл, только если второй ИИ не повторяет слепые пятна первого. Запуск занимает несколько минут, лучше отправить в фон.
Какие задачи решает
- Получить независимую второе мнение перед тем как слить PR
- Найти пропущенные проблемы в коде через дебаты двух моделей
- Оставить рецензию на PR/MR без ручного осмотра диффа
- Провести локальный review рабочей ветки до создания PR
Примеры запросов агенту
- Запусти
node "<skill-dir>/scripts/review-pr.mjs" 42на PR номер 42 в текущем репозитории - Запусти
node "<skill-dir>/scripts/review-pr.mjs" --local --base mainдля локального review ветки относительно main - Запусти с флагом
--dry-run, чтобы увидеть рецензию перед постингом вместо публикации
Как установить debate-review
1Через Skills CLI (Vercel)
npx skills add amElnagdy/review-skills --skill debate-review -a claude-code2Вручную: положить файлы
~/.claude/skills/debate-review/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/debate-review/
1Через Skills CLI (Vercel)
npx skills add amElnagdy/review-skills --skill debate-review -a codex2Вручную: положить файлы
.agents/skills/debate-review/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add amElnagdy/review-skills --skill debate-review -a cursor2Вручную: положить файлы
.cursor/skills/debate-review/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install amElnagdy/review-skills debate-review2Вручную: положить файлы
.github/skills/debate-review/SKILL.md1Через Skills CLI (Vercel)
npx skills add amElnagdy/review-skills --skill debate-review -a gemini-cli2Командой платформы
gemini skills install https://github.com/amElnagdy/review-skills --path skills/debate-reviewВручную: положить файлы
.devin/skills/debate-review/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add amElnagdy/review-skills --skill debate-review -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о debate-review
Как установить debate-review в Claude Code?
Выполните команду npx skills add amElnagdy/review-skills --skill debate-review -a claude-code, потом откройте ~/.claude/skills/debate-review/SKILL.md и следуйте инструкциям.
Что делает debate-review?
Запускает две сессии ИИ-обозревателя параллельно: основной ищет проблемы в диффе PR, второй их оспаривает или добавляет свои. Потом основной принимает окончательное решение, и рецензия постится как встроенные комментарии на PR, MR или выводится в консоль.
Какой нужен Node и какие команды CLI для работы?
Требуется Node 18+, Git 2.31+ для Azure DevOps и одна из аутентифицированных утилит: gh (GitHub), glab (GitLab) или az (Azure DevOps). Дополнительно установите скилл delegate-skills для двух полос обозревателей.
Исходный текст
SKILL.md · MIT
--- name: debate-review description: Two-model debate review of a GitHub PR, GitLab MR, Azure DevOps PR, or local working tree, posted as inline comments or printed. Use for any PR/MR review request, or a local review before a PR exists. license: MIT compatibility: Requires Node 18+, Git 2.31+ for Azure DevOps, `gh` (GitHub), `glab` (GitLab) or `az` (Azure DevOps) authenticated, and delegate-skills installed for the main/debate lanes. metadata: version: 0.2.0 --- # debate-review Two models argue before anything is posted. A main reviewer finds issues. A debate reviewer tries to knock them down and may add its own. The main reviewer then makes the final call, and one review with inline comments lands on the PR or MR. It posts from the user's own `gh`, `glab` or `az` account as a non-approval review or comment. It never approves and never requests changes. You are the orchestrator. You run one command and relay the result. You do not review the diff yourself, and you do not touch the PR. ## Run it ```bash node "<skill-dir>/scripts/review-pr.mjs" --local [--base <ref>] node "<skill-dir>/scripts/review-pr.mjs" <pr-url | number> [--dry-run] ``` - If the user wants a review and there is no PR/MR URL, run `--local` from the repo (or `--repo-dir`). Do not invent a URL. Relay stdout. `--local` never talks to a forge and rejects non-UTF-8 Git paths rather than decoding them lossily. - `<pr-url>` is a GitHub `/pull/N`, GitLab `/-/merge_requests/N`, or Azure DevOps `/_git/<repo>/pullrequest/N` URL (`dev.azure.com` or the legacy `*.visualstudio.com`). A bare number resolves against the cwd's `origin`, including Azure DevOps https and `ssh.dev.azure.com:v3/` remotes. - `--dry-run` prints a live PR review instead of posting it. It does not combine with `--local`. - Azure DevOps needs `az` logged in (`az login`) with access to the project. No extension is required, the script talks to the REST API through `az rest`. A review there is N inline comment threads plus one closed summary thread, since Azure DevOps has no single review object; the alert blockquotes render as plain quotes, which still read. - The reviewers are two delegate-skills lanes, `review-main` and `review-debate`. If either is missing the script says so. Add them with `delegate-setup`. Pick two different implementers, since the debate is only worth something when the second model doesn't share the first one's blind spots (main `claude` or `grok`, debate `codex` at high effort is a good pair). For a one-off, pass `--main <implementer>` or `--debate <implementer>`. Only implementers whose relay has `--read-only` are accepted. These two lanes belong to the reviewer. Don't point them at a lane you use for other work, such as a plan-debate lane. - `--check` starts each reviewer on a one-line read-only brief and prints `ok` or `FAIL` with the reason per role, exit `1` on any failure. Run it once on every machine after setting up the lanes; it catches a reviewer that is not installed, not signed in, out of quota, or refused by its sandbox before a PR waits on it. - Exit code `3` means this head sha already has a debate-review. Re-run with `--force` to post again. - A run takes minutes, since it is two or three implementer sessions back to back. Run it in the background and report the printed URL when it finishes. Don't poll tightly. All flags: `--help`. Contracts: [references/schema.md](references/schema.md). What gets posted: [references/comment-format.md](references/comment-format.md). The reviewer briefs live in `assets/prompts/` and the script fills them in; you don't need to read them. ## After it posts Each posted comment carries a `<!-- debate-review:<id> status=... -->` marker. `babysit-pr` handles GitHub and GitLab rounds (verify, fix blockers, reply, resolve). It cannot harvest Azure DevOps yet, so relay Azure findings directly to the user. Don't act on the findings yourself unless asked. ## Artifacts `~/.cache/debate-review/<owner>__<repo>/<N>/<head>/` holds `run.json` (all three documents, timings, what was posted) plus `main/`, `debate/`, and `final/`, each with the brief sent and the relay's `result.json`. `--local` writes under `~/.cache/debate-review/local/<repo>/<branch>/<head>/` instead.
© amElnagdy · MIT · amElnagdy/review-skills