adversarial-python

adversarial-python is a skill for Claude Code, Codex from pproenca/dot-skills. It costs 224 tokens per session (2,207 once invoked), scanned A, original, MIT.

A pass/fail review gate for Python code using modern Python features and code structures. A blind reviewer checks 20 specific rules and accepts the work only when every rule passes or does not apply.

In plain words
What is it for?
Use it to review Python 3.10 or newer changes for unnecessary condition chains, manual data-class code, old type syntax, missing standard-library helpers, and similar structure problems.
Why use it?
It catches outdated patterns and new code that extends an existing poor structure. The checks are based on evidence visible in the code rather than broad advice.

Skill for Claude CodeCodex

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

Good fit Use it to review Python 3.10 or newer changes for unnecessary condition chains, manual data-class code, old type syntax, missing standard-library helpers, and similar structure problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pproenca/dot-skills/adversarial-python
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 pproenca/dot-skills --skill adversarial-python
Clone the repo
git clone --depth 1 https://github.com/pproenca/dot-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/pproenca/dot-skills/adversarial-python.svg)](https://agentmods.dev/skills/pproenca/dot-skills/adversarial-python)
Your own site
<a href="https://agentmods.dev/skills/pproenca/dot-skills/adversarial-python"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/adversarial-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 224 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,207 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00224 $0.02207
Opus 5 $0.00112 $0.01104
Sonnet 5 $0.00045 $0.00441
Haiku 4.5 $0.00022 $0.00221

Measured 8d ago against content hash 4d0cc97a0feb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

adversarial-python 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 8d 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/.experimental/adversarial-python/SKILL.md · 69 lines

How it starts

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

Adversarial Python Gate

A modern-idiom and code-structure review gate for Python — pass/fail: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.

The rules target two failure modes with one root cause — the author reproduced a shape instead of designing one. Training-data inertia produces code a modern Python feature deletes outright: the if/elif ladder that match or a registry replaces, the __init__/__repr__/__eq__ triple that @dataclass(slots=True) generates, the TypeVar ritual PEP 695 retired, the chunking helper itertools.batched shipped. Legacy-pattern propagation produces new code faithfully extending the surrounding codebase's bad structure — one more branch on the event ladder, one more method on the pass-through service — instead of tracing the feature end-to-end and modeling it. Each rule carries an Evidence of violation paragraph so a reviewer can decide PASS/FAIL/N/A from artifact evidence alone, and a Requires Python ≥ 3.X gate where the fix depends on a language version.

When to Apply

  • A Python feature, endpoint, or module (agent-authored or human) is about to merge and needs an objective PASS/FAIL on whether modern Python and a fresh architectural look would delete or restructure it.
  • An agent extended a legacy codebase and you suspect it copied the existing patterns — event/version branch ladders, service layers that only forward, stringly-typed state — instead of re-architecting the feature.
  • A codebase raised its Python floor (to 3.12, 3.13, 3.14+) and changed code should be held to the idioms the new floor enables.
  • A refactor claims to modernize or simplify and you want the claim verdict-checked rather than diff-skimmed.

Do not apply to targets with no Python source (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"), or when the user wants explanations and refactors rather than a verdict. Judgment calls the gate deliberately excludes — naming taste, function length, docstring and test coverage, performance tuning — belong to advisory skills, not this gate.

Read the full file on GitHub · 69 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. 8d ago First seen · 69 lines · 224 tokens per session scan A 4d0cc97a0feb

Subscribe to this mod's changes

adversarial-python is a skill published in the GitHub repository pproenca/dot-skills (203 stars, last pushed 23d ago), licensed MIT. It adds 224 tokens to every session and 2,207 once invoked, about $0.0011 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.