From m2ai-skills-pack
Set up and run a two-AI coding workflow where a primary assistant handles planning and code generation while an adversarial auditor stress-tests the plan, catches edge cases, and reviews output before shipping. Use when the user wants complementary AI tool pairing, a structured code review gate, an adversarial planning loop, or a background audit running in parallel with active development.
How this skill is triggered — by the user, by Claude, or both
Slash command
/m2ai-skills-pack:adversarial-dual-model-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Structures a two-role AI workflow: one model acts as the creative pair-programmer (planning, writing, iterating), the other as the ruthless auditor (catching edge cases, stress-testing assumptions, reviewing before ship). Neither role is "better" — they have different superpowers. The reference implementation uses Claude Code as primary and the Codex CLI plugin as auditor, but the pattern appli...
Structures a two-role AI workflow: one model acts as the creative pair-programmer (planning, writing, iterating), the other as the ruthless auditor (catching edge cases, stress-testing assumptions, reviewing before ship). Neither role is "better" — they have different superpowers. The reference implementation uses Claude Code as primary and the Codex CLI plugin as auditor, but the pattern applies to any pair of complementary AI tools.
Trigger on: "codex plugin", "claude and codex together", "adversarial code review", "second opinion from another AI", "dual model workflow", "review gate", "SWAT team audit", "stress-test my plan", "audit in parallel", "two AI tools", "complementary AI", or when the user wants a structured adversarial loop before shipping.
Ask the user to assign each tool to a role. If they are using Claude Code + Codex, defaults are already set.
| Role | Strengths | Default tool |
|---|---|---|
| Primary (Builder) | Planning, creative problem-solving, writing code, iterating | Claude Code |
| Auditor (Reviewer) | Edge-case detection, adversarial questioning, pre-ship validation | Codex / second model |
Key distinction to clarify upfront:
Recommend adviser mode for planning loops; executor mode only for targeted, well-scoped repairs.
Present the five patterns and ask which situation applies. More than one may apply in a single session.
When: After writing a feature or fixing a bug. Low ceremony, high frequency.
Steps:
Cost: low (single audit pass). Recommended default before every commit.
When: Before writing any code on a non-trivial feature. Invest 30–90 minutes here to save hours later.
Steps:
Signal the loop is done when the auditor's response is shorter than your plan.
When: You are actively building and feel stuck, or want an independent audit without pausing flow.
Steps:
Caution: background audits on large codebases can be expensive. Set a token or time budget before launching.
When: Before merging or deploying. Deliberately adversarial.
Steps:
When: Building a non-trivial feature end-to-end.
Sequence:
For the reference implementation (Claude Code + Codex plugin):
# Install the Codex Claude Code plugin once
# See: https://github.com/openai/codex-plugin-cc
# Adviser mode — Codex produces a report, you act on it
/codex review the current diff for edge cases and logic errors
# Background mode — audit runs while you keep building
/codex --background audit the full src/ directory for security issues
# Model selection (background flag)
/codex --background --model o3 review the authentication module
For other tool pairings, document the equivalent invocation here before running.
When the audit completes, process findings in priority order:
| Priority | Definition | Action |
|---|---|---|
| P0 | Would cause a production incident or data loss | Fix before any further work |
| P1 | Logic error or edge case likely to surface in testing | Fix in this session |
| P2 | Style, optimization, or future-risk | Log as a follow-up task |
| Ignore | False positive or out of scope | Document why you rejected it |
Do not batch all findings into a later PR. P0 items ship with the feature or block it.
Mark Kashef — "You Can Run Claude AND Codex Together. Here's How." (YouTube, 2026-04-26). Video ID: Fu5KIG2Jm1g. Core insight: stop picking a winning AI tool; assign complementary roles (creative builder + ruthless auditor) and wire them together. The five patterns generalize beyond Claude+Codex to any two-model pairing. Codex plugin: https://github.com/openai/codex-plugin-cc.
npx claudepluginhub m2ai-portfolio/m2ai-skills-pack --plugin m2ai-skills-packGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.