adversarial-gate

adversarial-gate is a skill for Claude Code, Codex from jpantsjoha/ai-native-developer-experience. It costs 46 tokens per session (843 once invoked), scanned A, original, Apache-2.0.

A review step that challenges a proposed design or decision by asking, “How would I break this?” It requires naming at least two plausible ways the proposal could fail before proceeding.

In plain words
What is it for?
Use it before finalising architecture, releasing or deploying software, taking irreversible actions, or approving a design that appears deceptively simple.
Why use it?
It exposes weak assumptions, production failure risks, and the possible impact of mistakes before they become harder to fix. This is especially useful for high-stakes or irreversible work.

Skill for Claude CodeCodex

Part of the join-the-team plugin — 21 skills, 3 commands, 1 hook shipped together

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.

agentmods
npx agentmods add skills/jpantsjoha/ai-native-developer-experience/adversarial-gate
Any agent
npx skills add jpantsjoha/ai-native-developer-experience --skill adversarial-gate
Clone the repo
git clone --depth 1 https://github.com/jpantsjoha/ai-native-developer-experience

Made for: Claude Code, Codex.

Or install join-the-team, the plugin that ships this one along with the rest of its 21 skills, 3 commands, 1 hook.

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 adversarial-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/jpantsjoha/ai-native-developer-experience/adversarial-gate.svg)](https://agentmods.dev/skills/jpantsjoha/ai-native-developer-experience/adversarial-gate)
Your own site
<a href="https://agentmods.dev/skills/jpantsjoha/ai-native-developer-experience/adversarial-gate"><img src="https://agentmods.dev/badge/skills/jpantsjoha/ai-native-developer-experience/adversarial-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00046 $0.00843
Opus 5 $0.00023 $0.00421
Sonnet 5 $0.00009 $0.00169
Haiku 4.5 $0.00005 $0.00084

Measured 5d ago against content hash 609c9fb6431d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

adversarial-gate 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 5d 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/adversarial-gate/SKILL.md · 66 lines

How it starts

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

Adversarial Gate

Coined by Jaroslav Pantsjoha (#HarnessEngineering). The Adversarial Gate is the practice of forcing an agent — or a human — to argue against their own design before proceeding. It pre-empts bad reasoning before bad output exists.

The gate has one question: "How would I break this?"

Answer it honestly. If you cannot name at least two plausible failure modes, you do not understand the system well enough to ship it.

When to use

  • Before finalising any architecture or design decision
  • Before a deployment or release
  • When an agent is about to take an irreversible action
  • When a design looks clean and elegant (danger signal — simple-looking systems hide the hard failure modes)
  • When the team is under time pressure and "just shipping it" feels compelling

Procedure

  1. State the proposal clearly — in one or two sentences, what is the approach being validated?
  2. Run the adversarial pass — argue against it. Ask:
    • What is the single most likely way this fails in production?
    • What happens under load / at scale / with bad input?
    • What is the blast radius if this fails? Is it recoverable?
    • What assumption does this design make that could be wrong?
    • What does the monitoring not cover that would let this fail silently?
  3. Name at least two concrete failure modes — not "something could go wrong" but specific, nameable failures.
  4. Check each failure mode has a mitigation or an accepted risk owner — unmitigated = not shippable.
  5. Document the outcome — pass (risks named and owned) or fail (proceed to redesign). Attach to the ADR or PR.

Outputs

  • Adversarial Gate verdict: PASS / FAIL
  • Named failure modes with mitigations or risk-owner sign-off
  • Optional: a short paragraph appended to the ADR or PR description summarising the gate result

Guardrails

  • One argument is not enough. A single failure mode is the one you were already thinking about. The Adversarial Gate is looking for the one you were not.
  • "We have tests" is not a mitigation. Tests cover known paths. The gate is looking for unknown paths.
  • Time pressure does not suspend the gate. Pressure is when you need it most.
  • The gate is not pessimism. It is the fastest route to confidence — because you have already stress-tested the design yourself.

Read the full file on GitHub · 66 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. 5d ago First seen · 66 lines · 46 tokens per session scan A 609c9fb6431d

Subscribe to this mod's changes

adversarial-gate is a skill published in the GitHub repository jpantsjoha/ai-native-developer-experience (11 stars, last pushed 29d ago), licensed Apache-2.0. It adds 46 tokens to every session and 843 once invoked, about $0.0002 per session on Opus 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-08-30.

Related

Other skills, from other repositories