AA

addyosmani/adverse

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

63 stars 质量 65 趋势 18MIT

多代理对抗代码审查,适用于任何编码代理

概览

多代理对抗代码审查,用于编码代理。既有独立代码,也有Claude代码——选择适合你工作流程的,底层逻辑是Node.js代码。 封装任何读取 stdin 并写 stdout 的编码代理 CLI ——Claude Code、Codex CLI、Gemini、Aider、Ollama 等。当你想进行门控 CI、从 Makefile 运行或使用非 Anthropic 模型时,它很适合。 技能在技能/负面评价/。通过 skills.sh 进行一句话安装: 它会克隆仓库,定位技能/adverse-review/,然后安装到~/.claude/skills/adverse-review/(或.claude/skills/,带--project)。重新运行以更新。如果你想固定具体子路径,npx技能添加https://github.com/addyosmani/adverse/tree/main/skills/adverse-review也行。或者手动安装: 在Claude Code内,请求“对抗性审查”、“对这些变更的不利评价”或“从多个角度审视我的修改”——或者点击/不利审查。

概述(AI 翻译)

针对任何编码代理的多代理对抗代码审查。既可作为独立的CLI发布,也可以作为Claude代码技能——选择适合你的工作流程,底层逻辑Node.js代码。

有两种运行方式

作为一个CLI

封装任何读取 stdin 并写 stdout 的编码代理 CLI ——Claude Code、Codex CLI、Gemini、Aider、Ollama 等。当你想进行门控 CI、从 Makefile 运行或使用非 Anthropic 模型时,它很适合。

作为克劳德代码技能

该技能在skills/adverse-review/中。通过 skills.sh 进行一句话安装:

它克隆仓库,定位skills/adverse-review/,并安装到~/.claude/skills/adverse-review/(或.claude/skills/,用--project)。重新运行以更新。如果你更想固定精确的子路径,npx skills add https://github.com/addyosmani/adverse/tree/main/skills/adverse-review也可以。或者手动安装:

在Claude代码中,请求“对抗性审查”、“对这些变更的不利审查”或“从多个角度审视我的更改”——或者点击/adverse-review。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

adverse

Multi-agent adversarial code review for any coding agent. Ships as both a standalone CLI and a Claude Code Skill — pick whichever fits your workflow, the underlying logic is the same Node.js code.

$ adverse review ./src
⏳ collecting source...
   42 files in ./src
⏳ round 1: 3 reviewers in parallel...
   ✓ auditor:    5 findings, conditional (38.2s)
   ✓ adversary:  3 findings, reject       (44.7s)
   ✓ pragmatist: 4 findings, approve      (29.1s)
⏳ round 2: 3 reviewers cross-examining...
   ✓ auditor:    2 validated, 1 challenged, 0 added
   ✓ adversary:  4 validated, 0 challenged, 1 added
   ✓ pragmatist: 1 validated, 2 challenged, 0 added
⏳ synthesizing...

# Adversarial Code Review

**Verdict:** SHIP-WITH-CAVEATS (2/3 ship, 1/3 block)
**Findings:** 3 critical · 5 warning · 1 info

## Cross-validated findings (multiple reviewers reported independently)
### 🔴 [CRITICAL] SQL injection in query builder — db.py:22
…

Two ways to run it

As a CLI

Wraps any coding-agent CLI that reads stdin and writes stdout — Claude Code, Codex CLI, Gemini, Aider, Ollama. Good when you want to gate CI, run from a Makefile, or use a non-Anthropic model.

npm install -g adverse
# or run directly without installing:
npx adverse review ./src

As a Claude Code Skill

The skill is in skills/adverse-review/. One-liner install via skills.sh:

npx skills add addyosmani/adverse

That clones the repo, locates skills/adverse-review/, and installs it to ~/.claude/skills/adverse-review/ (or .claude/skills/ with --project). Re-run to update. If you’d rather pin the exact subpath, npx skills add https://github.com/addyosmani/adverse/tree/main/skills/adverse-review works too. Or do it by hand:

git clone https://github.com/addyosmani/adverse.git ~/.adverse-source
mkdir -p ~/.claude/skills
ln -s ~/.adverse-source/skills/adverse-review ~/.claude/skills/adverse-review

Inside Claude Code, ask for “adversarial review”, “adverse review of these changes”, or “review my changes from multiple angles” — or hit /adverse-review. The skill handles scope detection (uncommitted changes vs branch diff vs full tree), spawns three reviewer subagents in parallel via Claude Code’s native Agent tool (no nested-auth issues, no subprocess overhead), runs the cross-review round, and calls a small Node helper for the deterministic synthesis step. Needs node ≥ 20 on PATH; no npm install.

Both modes share the same src/ core, so a finding the CLI flags is the same finding the Skill flags — no drift between the two.

Why this design

The naive way to do “AI code review” is one model, one shot. You get one perspective with all the blind spots that perspective has.

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add addyosmani/adverse
新手?先看 mcpskill.org 教程 →