ai-adversarial-loop

ai-adversarial-loop is a skill for Claude Code, Codex from arcasilesgroup/ai-engineering. It costs 108 tokens per session (1,148 once invoked), scanned A, original, Apache-2.0.

A coordinator that runs repeated rounds between a critic agent and a fixing agent. The critic reports possible code problems, while the fixer repairs them or disputes them with evidence through a shared review thread.

In plain words
What is it for?
Use it to review a checkpoint or a set of changed files through several critic-and-fix rounds. It can cover code changes with the project's verification commands.
Why use it?
It automates the back-and-forth needed to verify that review findings are resolved. The loop stops only when the configured review checks pass or the round limit is reached.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions AGENTS.md.

Good fit Use it to review a checkpoint or a set of changed files through several critic-and-fix rounds. It can cover code changes with the project's verification commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arcasilesgroup/ai-engineering/ai-adversarial-loop
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add arcasilesgroup/ai-engineering --skill ai-adversarial-loop
Clone the repo
git clone --depth 1 https://github.com/arcasilesgroup/ai-engineering

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-adversarial-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/arcasilesgroup/ai-engineering/ai-adversarial-loop/github.svg)](https://agentmods.dev/skills/arcasilesgroup/ai-engineering/ai-adversarial-loop)
Your own site
<a href="https://agentmods.dev/skills/arcasilesgroup/ai-engineering/ai-adversarial-loop"><img src="https://agentmods.dev/badge/skills/arcasilesgroup/ai-engineering/ai-adversarial-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-adversarial-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/arcasilesgroup/ai-engineering/ai-adversarial-loop"><img src="https://agentmods.dev/badge/skills/arcasilesgroup/ai-engineering/ai-adversarial-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01148
Opus 5.5 $0.00043 $0.00459
Sonnet 5.5 $0.00022 $0.00230
Haiku 4.5 $0.00011 $0.00115

Measured 19d ago against content hash bda5c3a60bff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-adversarial-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ai-adversarial-loop/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adversarial loop

You are the coordinator. You run in the main session because only the main session can start and resume agents. Subagents can't launch other agents, and agent-team teammates can't be the lead. You never review code or fix it yourself, and you never read the thread file. You pass turns between the two agents and act on their short returns.

Setup

  • Thread file: under /ai-orchestrator, it's .ai-engineering/workflow/reviews/<slug>-<id>.md. Standalone, it's .ai-engineering/workflow/reviews/<topic>-<YYYY-MM-DD>.md. Create it with a header: the checkpoint's goal and acceptance criteria (or the user's scope), the changed_files, and the verify commands. Nothing else.
  • Scope: the checkpoint slice and changed_files. Standalone, it's git diff HEAD plus untracked files, and the verify commands are the full test suite, lint and build from the Project config section of AGENTS.md.
  • Under /ai-orchestrator, prompts start with the gate markers: [checkpoint <slug>#<id> review] for the critic and [checkpoint <slug>#<id> fix] for the fixer.

Rounds (at most 4)

  1. Critic, round 1: start adversarial-reviewer with the scope, the thread path and "Debate mode, round 1". Keep its agent ID. If it returns VERDICT: PASS, you're done; go to the end.
  2. Fixer, round N: start fixer with the thread path, the scope and "round N". On later rounds, resume the same fixer with SendMessage and its ID: "Round N: the critic has ruled, see the thread." Add its FILES to changed_files.
  3. Critic, round N+1: resume the same critic with SendMessage: "Round N+1: the fixer has responded, see the thread. Verify, rule, and attack the new changes."
  4. VERDICT: PASS ends the loop. Otherwise repeat from step 2.

Unlike the orchestrator's "fresh workers" rule, each role here keeps its context: the critic remembers what it flagged, and the fixer remembers what it changed. They stay isolated from each other and from you, and the thread file is the only thing they share.

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 51 lines · 108 tokens per session scan A bda5c3a60bff

Subscribe to this mod's changes

ai-adversarial-loop is a skill published in the GitHub repository arcasilesgroup/ai-engineering (61 stars, last pushed 2d ago), licensed Apache-2.0. It adds 108 tokens to every session and 1,148 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

Other skills, from other repositories

pipeline-validator

Discovers, triggers, and monitors Azure DevOps pipelines (PR, Buddy Build, Buddy Release) for the current repo and branch. Auto-diagnoses failures from build logs, applies fixes, commits, pushes, and re-triggers until all pipelines pass or max retries reached. Validates PR existence and description completeness.…

rjmurillo/ai-agents · 82 tokens

ai-agents-empirical-probe-toolkit

Prove-it methods for this repo. Six recipes for runtime-contract probes, guard and threshold calibration, eval A/B, docs-vs-reality audits, reproduce-on-main CI triage, and negative-control test design, each with a worked example from repo history. Use when you say probe the runtime contract, calibrate this guard…

rjmurillo/ai-agents · 119 tokens

taste-lints

Use when you say run taste lints, check file size, or lint taste invariants. Custom lints with agent-readable remediation instructions for file size, naming conventions, structured logging, and complexity.

rjmurillo/ai-agents · 47 tokens

ai-agents-debugging-playbook

Symptom-to-triage playbook for this repo's recurring failures. Blocked pushes, drift gate reds, plugin bump reds, coverage pin trips, hook exit 143, session NONCOMPLIANT. Maps each symptom to a first command, discriminating experiment, fix path, and trap. Use when you say triage this failure, why is my push blocked…

rjmurillo/ai-agents · 124 tokens

ai-agents-config-catalog

Catalog of every configuration axis in this repo, env vars, commit markers, frontmatter keys, QA skip verdicts, and escape hatches, each with its enforcement point and abuse story, plus the checklist for adding a new flag safely. Use when you say what does a skip flag do, list escape hatches, can I skip this gate, add…

rjmurillo/ai-agents · 114 tokens

extension-audit-methodology

Systematic 5-dimension audit framework for VS Code extensions — debug hygiene, dead code, performance, menu validation, dependency cleanup.

fabioc-aloha/Alex_Skill_Mall · 32 tokens