Skip to main content
ClaudeWave
Skill228 repo starsupdated yesterday

orchestrating-adversarial-reviews

Multi-agent adversarial-verification orchestration for high-confidence conclusions. Fan-out finders, then verify every finding through a three-prism panel (exploitability / correctness / refutation) that defaults to disbelief, gate fixes behind load-bearing proof tests that catch agents who falsely claim "done/fixed", and roll out behind a build-first exit-code guard. Use when a fan-out task must produce trustworthy results — security audit, code review, research synthesis, migration — and a single agent's self-report cannot be trusted. Composes with securing-systems (what to look for) and shipping-changes (change closed loop); orchestration engine is the Workflow tool.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/telagod/code-abyss /tmp/orchestrating-adversarial-reviews && cp -r /tmp/orchestrating-adversarial-reviews/skills/orchestrating-adversarial-reviews ~/.claude/skills/orchestrating-adversarial-reviews
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

<!-- safety-scan: ignore RM_RF_ROOT,CURL_PIPE_SH,PROMPT_INJECTION 本 skill 把危险命令(| tail 吞退出码、docker rm 误删、agent 谎报)列为反模式教学,自身不执行 -->
<!-- safety-scan: ignore TOOLS_PRIVILEGED 知识型 skill,仅 Read;文中 Workflow / docker / go / git 命令由 agent 自有工具执行,非本 skill 落盘运行 -->

# 对抗验证编排 · orchestrating-adversarial-reviews

> 单个 agent 会谎报"已修复 / 全覆盖 / 没问题"。结论的可信度不来自"谁说的",来自"扛过几次推翻"。
> 本 skill 是**编排骨架**:fan-out 发现 → 三棱镜对抗验证 → 证明性 guard → 守卫式上线。
> 信级:运行时行为 / 证明测试 > 多 agent 多数裁决 > 单 agent 自报(永远 `[unverified]`)。

## 核心信条

1. **不信单 agent 自报。** finder 会噪音误报,implementer 会谎称"已修复/全覆盖"。每个高价值结论必须被独立 agent 用**不同视角**尝试推翻。
2. **可证伪 > 可声称。** 修复必须配一个"退回漏洞代码就 FAIL、修好才 PASS"的 **load-bearing 证明测试**。没有证明测试的"已修复"等于没修。
3. **失败方向要对。** 守卫链里任何一步的退出码都不能被管道遮住;破坏性动作前置可逆检查。

## 何时使用

| 场景 | 用 | 理由 |
|------|----|------|
| 授权安全审计 / 加固闭环 | ✅ | 首个范例,见 [workflow](references/workflow.md) |
| 大面积代码审查(多维度、需高可信) | ✅ | dimensions → find → 对抗验证 |
| 研究综合 / 事实核查(结论要扛得住) | ✅ | 多源 fan-out + 证伪棱镜 |
| 大规模迁移 / 重构(site 发现 + 逐项验证) | ✅ | pipeline 逐项独立 + 证明测试 |

## 何时不使用

- ❌ 单文件、低风险、机械改动——直接做完跑测试,别套编排(参见 `shipping-changes` 的"何时不使用")。
- ❌ 用户没有 opt-in 多-agent 编排 / 没开 ultracode——Workflow 会 fan-out 几十个 agent 烧大量 token,必须显式授权。
- ❌ 只需要"找什么洞"的知识——那是 `securing-systems` / `analyzing-security`,本 skill 不重写知识,只编排。

## 编排骨架(三相)

```
Recon (fan-out)     每维一个 finder, 并行深读, schema 出结构化 findings
   |                pipeline 而非 barrier: 维度A的发现可在维度B还在找时就进验证
   v
Verify (三棱镜)     每条 finding 派 N 个 verifier, 各执一镜, 默认怀疑
   |                可利用性 / 正确性 / 证伪猎杀 —— 票数 >= 多数 才保留
   v
Synthesize / Ship   合成定级报告; 若是修复任务 -> 证明测试 guard -> build-first 上线
```

对应 Workflow 工具的 `pipeline(items, findStage, verifyStage)`(默认无栅栏,墙钟最短)。仅当"下一阶段需全部上一阶段结果"(去重 / 早退 / 跨条比较)才用 `parallel` 栅栏。

## 四大护栏(实战血泪,按重要度)

1. **三棱镜对抗验证**(防 finder 噪音)——每条发现派视角各异的 verifier(可利用性 / 正确性 / 证伪猎杀),默认怀疑,多数票 `confirmed` 才保留。
2. **证明性测试 guard / load-bearing**(防 implementer 谎报)——修复配真行为测试,且测试本身能"反向证伪"(退回漏洞版必 FAIL)。**本 skill 的命门。**
3. **build-first + 退出码 guard**(防误删 / 半成品上线)——先构建验证新件再动旧件;`cmd | tail` 会吞掉 `cmd` 的退出码,判码用 `cmd > log 2>&1; rc=$?`。
4. **语境校准降噪**——fan-out 前钉死威胁模型 / 评判语境,否则收一堆无效发现。

> 每条护栏的细节、PoC 判据、反向证伪实操、安全审计 worked example,见 [references/workflow.md](references/workflow.md)。

## 反模式

- 信单 agent "已修复 / 没问题 / 全覆盖"——必过对抗验证 + 证明测试。
- `up --build 2>&1 | tail && rm <old>`——管道吞码,build 失败仍删旧件。
- N 个同质 verifier 复读同一判断——要视角多样,否则冗余不抗错。
- 多 agent 同一工作区并行**写**同批文件——冲突;要么单 implementer,要么 `isolation: worktree`。
- 用户未 opt-in 时擅自 fan-out 大舰队——先确认或估算成本。

## 参见

- `securing-systems` —— 攻防知识总路由(找什么洞)。
- `shipping-changes` —— 单上下文变更闭环脊柱。
- `cultivating-skills` —— 本 skill 的孵化器 / 安全脊柱 / 升级漏斗。
- Workflow 工具 —— 编排引擎(pipeline / parallel / schema / budget)。
analyzing-changesSkill

Analyzes code changes, detects documentation drift, and evaluates change impact scope. Use when reviewing diffs, checking doc sync, or running pre-commit analysis. Automatically triggered after design-level changes or refactoring.

analyzing-securitySkill

Scans code for security vulnerabilities, detects dangerous patterns, and ensures security decisions are documented. Use when running security scans, auditing code, or checking for OWASP issues, injection risks, or sensitive data leaks. Automatically triggered on new modules, security-related changes, or post-refactor.

analyzing-spreadsheetsSkill

Processes Excel spreadsheet files (.xlsx, .xlsm, .csv). Creates workbooks, builds formulas, preserves formatting, analyzes tabular data, and validates financial models with zero-formula-error delivery. Use when working with spreadsheet files or tabular data analysis. Do NOT use for Word documents, PDFs, presentations, or database pipelines.

applying-ui-design-systemSkill

Frontend UI design system selector and implementation guide covering Glassmorphism, Liquid Glass (Apple-style), Neubrutalism, and Claymorphism. Use when building UI components, choosing a visual aesthetic, implementing design tokens, or auditing accessibility/contrast on themed surfaces. Provides per-style tokens, component patterns, dark mode, and a11y constraints.

architecting-securitySkill

安全架构与治理:威胁建模 (STRIDE/PASTA/LINDDUN)、零信任身份架构、IAM/SSO/MFA/PAM、合规框架 (SOC2/PCI/HIPAA/GDPR)、DLP、隐私工程、安全控制设计。Use when designing security architecture, threat modeling new systems, implementing zero-trust identity, designing IAM/SSO/PAM, building compliance evidence chains, or planning privacy-by-design.

automating-devopsSkill

DevOps knowledge reference covering Git workflows, testing strategies, DevSecOps, release pipeline orchestration (release.yml, multi-arch images, cosign integration), CI/CD pipelines, database management, observability, and performance optimization. Use when working with Git, CI/CD, release pipelines, ghcr image publishing, testing, monitoring, or infrastructure automation.

building-agent-systemsSkill

AI agent and LLM system engineering reference covering single-agent dev (ReAct, tool calling, plan-execute), multi-agent coordination (swarm, role decomposition, file locking), LLM security (prompt injection, jailbreak defense, output filtering), RAG architecture (chunking, hybrid retrieval, rerank), and prompt engineering / evaluation (RAGAS, LLM-as-Judge). Use when building AI agents, designing RAG pipelines, orchestrating multi-agent workflows, hardening LLM apps, or writing prompts.

checking-code-qualitySkill

Checks code quality metrics including complexity, duplication, naming conventions, and function length. Use when running quality gates, reviewing code smells, or checking lint rules. Automatically triggered on complex modules or post-refactor.