Agent skill

Adversarial Python

by pproenca in pproenca/dot-skills

A skill your agent uses to gate Python code (floors 3.10+, rules verified through 3.14) with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 20…

MITAuto-check passedDevelopment

Install Adversarial Python

skills CLI
$ npx skills add pproenca/dot-skills --skill adversarial-python -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pproenca/dot-skills adversarial-python --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/adversarial-python .claude/skills/adversarial-python && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
adversarial-python
GitHub stars
214
Token cost
~2.4k tokens
SKILL.md length
1,108 words
Files
26 (incl. references, assets)
Skills in repo
182
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses to gate Python code (floors 3.10+, rules verified through 3.14) with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 20…

  • Works in 7 steps: Identify the target. Pin down exactly… → Probe the Python version. Read the… → Load the rules. Read… → …
  • Gate Python code (floors 3.10+
  • SKILL.md covers When to Apply, Review Protocol, Verdict Format and Rule Categories, plus 3 more sections
  • Reaches docs.python.org

What it does

Adversarial Python is an agent skill from pproenca/dot-skills. Use this skill to gate Python code (floors 3.10+, rules verified through 3.14) with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 20 decidable rules hunting two failure modes. First, code modern Python makes unnecessary — branch ladders over match/registries, hand-written init/repr/eq over dataclasses, TypeVar ritual over PEP 695, typing.Optional over PEP 604 unions, os.path over pathlib, hand-rolled stdlib batteries, deprecated utcnow, orphan createtask over…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 28 other files, including reference files and assets (for example `assets/templates/verdict.md`, `gotchas.md` and `metadata.json`).

It sits in Development, covering Legacy modernization and Subagents. It works with Python. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.

When your agent uses it

  • Gate Python code (floors 3.10+
  • Rules verified through 3.1
  • With a pass/fail adversarial review — a single blind reviewer subagent judges a diff
  • File set against 20 decidable rules hunting two failure modes

Example prompts

  • “/adversarial-python”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Identify the target. Pin down exactly what is under review (a diff, a set of files, a PR) and note the ref/paths so the review runs…
  2. Probe the Python version. Read the target's Python floor from pyproject.toml (requires-python), .python-version, setup.cfg, or the CI…
  3. Load the rules. Read references/_sections.md and every rule file in references/ (all disp-*.md, model-*.md, alt-*.md, typing-*.md…
  4. Compose the reviewer prompt. Fill references/reviewer-prompt.md with the rules, the target, the Python floor, and the delta briefing (if…
  5. Dispatch one blind reviewer. Launch a single Task subagent whose entire input is the composed prompt — no conversation context, no…
  6. Render fail-closed. The reviewer's structured output is the verdict — there is no merge step. Overall verdict is PASS only when every rule…
  7. Render the verdict. Fill assets/templates/verdict.md. On FAIL, aggregate the reviewer's "missing for PASS" suggestions into the fix list…

What it can do on your machine

Read from SKILL.md and the folder at commit cf93c57. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • docs.python.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Adversarial Python loads about 2.4k tokens when it runs, and up to ~17k if it reads all its reference files. Until then it costs about 255 tokens; SKILL.md has 1,108 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~255
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~17k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 1,108 words, ~2,370 tokens.

Download SKILL.mdSave it as .claude/skills/adversarial-python/SKILL.md (or your agent's skills folder). This skill also uses 25 other files; get the full folder from GitHub.
name
adversarial-python
description
Use this skill to gate Python code (floors 3.10+, rules verified through 3.14) with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 20 decidable rules hunting two failure modes. First, code modern Python makes unnecessary — branch ladders over match/registries, hand-written init/repr/eq over dataclasses, TypeVar ritual over PEP 695, typing.Optional over PEP 604 unions, os.path over pathlib, hand-rolled stdlib batteries, deprecated utcnow, orphan create_task over TaskGroup. Second, legacy-pattern propagation — single-implementation ABCs, pass-through layers, single-method classes, concrete-inheritance reuse, boolean-forked functions, shapeless payloads and parameter clumps — judged as if greenfield; consistency with legacy code is not PASS evidence. A version probe reads the target's Python floor, marks rules above it N/A, and fetches the official what's-new delta when the floor exceeds the verified version. Verdicts only, never fixes.

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.

Review Protocol

Follow these steps exactly — the gate's value is that every review runs the same way.

  1. Identify the target. Pin down exactly what is under review (a diff, a set of files, a PR) and note the ref/paths so the review runs against an unambiguous, fixed target. Include the repo root — several alt- and disp- rules must search beyond the diff for implementers, substitution sites, test doubles, and call sites (the reviewer prompt lists them).
  2. Probe the Python version. Read the target's Python floor from pyproject.toml (requires-python), .python-version, setup.cfg, or the CI matrix — cite the source; if undeclared, judge as the newest stable Python and say so. Then compare the floor against verified_python in metadata.json:
    • floor ≤ verified: proceed; version-gated rules above the floor will be N/A.
    • floor > verified: fetch https://docs.python.org/3/whatsnew/3.{N}.html for each version in the gap and compose a delta briefing — new stdlib batteries (they extend the std-no-hand-rolled-batteries table), new syntax and typing forms (they extend the disp-/typing- rules' reach), each line with its citation. The briefing goes into the reviewer prompt's {{VERSION_DELTA_BRIEFING}} slot. After the review, record the delta in gotchas.md so the rules can be re-verified and verified_python bumped.
  3. Load the rules. Read references/_sections.md and every rule file in references/ (all disp-*.md, model-*.md, alt-*.md, typing-*.md, std-*.md, flow-*.md files).
  4. Compose the reviewer prompt. Fill references/reviewer-prompt.md with the rules, the target, the Python floor, and the delta briefing (if any). The composed prompt must be fully self-contained — a reviewer sees no conversation history, so nothing may refer to context outside the prompt.
  5. Dispatch one blind reviewer. Launch a single Task subagent whose entire input is the composed prompt — no conversation context, no commentary alongside it.
  6. Render fail-closed. The reviewer's structured output is the verdict — there is no merge step. Overall verdict is PASS only when every rule is PASS or N/A; any single FAIL fails the gate. Never average, weigh severity, or waive a rule — a "minor" FAIL is a FAIL. If the reviewer returns "GATE NOT APPLICABLE" (no Python source in the target), stop and report that instead of a verdict.
  7. Render the verdict. Fill assets/templates/verdict.md. On FAIL, aggregate the reviewer's "missing for PASS" suggestions into the fix list, each with its location, ordered by category importance. Every rule whose result is FAIL must appear in the fix list with a change concrete enough to apply as written — if the reviewer's suggestion only restates the violation, derive the fix from the rule's correct example before rendering.

If the same rule flips verdicts across re-reviews of an unchanged target, or a human reads the evidence and overrides the verdict, that is a decidability bug in the rule — record it in gotchas.md and sharpen the rule; do not override the gate.

Show full SKILL.md (323 more words)Show less

Verdict Format

The reviewer returns, per rule: PASS | FAIL | N/A, evidence (file:line or a quote — required for PASS as well as FAIL), and for every FAIL, the fix that flips the rule to PASS once applied — the named change plus its location, never a restatement of the violation. The final report follows assets/templates/verdict.md.

Rule Categories

#CategoryPrefixThe wrong default it gates
1Dispatch & Control Flowdisp-Branch ladders where the design has a dispatch construct — event/version if/elif chains over registries/match, isinstance ladders over patterns, repeated state literals over StrEnum, boolean params forking whole bodies
2Data Modelingmodel-Data that never got a shape — hand-written __init__/__repr__/__eq__ over @dataclass(slots=True), parameter clumps threaded through signatures, external payloads navigated by string keys past the boundary
3Abstraction Altitudealt-Layers that add indirection without a decision — single-method classes, 1:1 pass-through wrappers, single-implementation ABCs (a consumer-side Protocol is the seam), concrete inheritance for reuse
4Modern Typingtyping-Pre-3.10 spellings by habit — typing.List/Optional/Union over builtins and X | None, TypeVar/Generic ritual over PEP 695, class-name returns over Self
5Stdlib Currencystd-Hand-rolled batteries — os.path surgery over pathlib, re-implemented batched/pairwise/cache/tomllib, deprecated utcnow(), unchecked zip over independent sources; extended by the version-delta briefing
6Async & Error Flowflow-Failure paths that vanish — fire-and-forget create_task over TaskGroup, broad except bodies that swallow without logging or recording

Gotchas

Read gotchas.md before dispatching the reviewer — it pre-records scope guards (the version probe's edge cases, shapes-not-brands, the diff-vs-repo search obligations, what "greenfield judgment" does and does not license) so the reviewer does not judge outside the rules.

  • adversarial-ts-patterns — the TypeScript/React sibling gate for the same disease (over-abstraction and under-modeling); same protocol, different language.
  • radical-simplification — the advisory sibling: cognitive moves for collapsing complexity when you want to fix a failed verdict, not judge it.

Reference Files

FileDescription
references/reviewer-prompt.mdSelf-contained prompt template for each blind reviewer
assets/templates/verdict.mdVerdict report template
references/_sections.mdCategory definitions and ordering
metadata.jsonVersion, verified_python, and source references

© pproenca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 25 other files (references, assets) in skills/.experimental/adversarial-python of pproenca/dot-skills.

  • SKILL.md
  • assets/templates/verdict.md
  • gotchas.md
  • metadata.json
  • references/_sections.md
  • references/alt-collapse-passthrough-layers.md
  • references/alt-compose-over-concrete-inheritance.md
  • references/alt-function-over-single-method-class.md
  • references/alt-no-single-impl-interfaces.md
  • references/disp-match-over-isinstance-ladders.md
  • references/disp-registry-over-branch-ladders.md
  • references/disp-split-boolean-switch-params.md
  • references/disp-strenum-over-string-states.md
  • references/flow-no-silent-broad-except.md
  • references/flow-taskgroup-over-orphan-tasks.md
  • references/model-dataclass-over-boilerplate.md
  • references/model-shape-the-data-clump.md
  • references/model-typed-boundary-payloads.md
  • … and 8 more

Open the folder on GitHubat commit cf93c57

Compare with similar skills

Adversarial Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Adversarial Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adversarial Python this skillpproenca/dot-skills214—~2.4kAutomated safety check: PassMIT
jscpd Code Migration Trackerkucherenko/jscpd6.3k—~5kAutomated safety check: PassMIT
Inference Format Optimizera2ui-project/a2ui17k—~985Automated safety check: PassApache-2.0
Next Python Stdlib Upgrade PickerRustPython/RustPython22k—~257Automated safety check: PassMIT
Code Reviewunclecatvn/agent-skills143—~1.3kAutomated safety check: PassMIT
Veomni ReviewByteDance-Seed/VeOmni2.2k—~1.7kAutomated safety check: PassApache-2.0

Similar skills

  • Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.

    6.3k GitHub stars~5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Iterative benchmarking, evaluation, and algorithmic optimization of alternative A2UI inference formats (such as Express, Atom, and Elemental).

    17k GitHub stars~985 tokensUpdated today
    DevelopmentAuto-check passed
  • Picks the next CPython standard library module ready for a RustPython upgrade, skipping modules that already have an open upgrade pull request.

    22k GitHub stars~257 tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    unclecatvn/agent-skills

    A skill your agent uses when receiving code review feedback (especially if unclear or technically questionable), when completing tasks or major features requiring review before proceeding, or before…

    143 GitHub stars~1.3k tokensUpdated 13 days ago
    DevelopmentAuto-check passed
  • Veomni Review

    ByteDance-Seed/VeOmni

    Pre-PR code review gate. An agent skill from ByteDance-Seed/VeOmni.

    2.2k GitHub stars~1.7k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Subagent-Driven Development

    HoangNguyen0403/agent-skills-standard

    Runs a multi-task implementation plan by sending each task to a fresh implementer subagent, reviewing it independently, then reviewing the whole branch.

    570 GitHub stars~852 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from pproenca/dot-skills

All 182 skills in this repo
  • Audio Voice Recovery

    pproenca/dot-skills

    Audio forensics and voice recovery guidelines for CSI-level audio analysis.

    214 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Codemod React Pipeline

    pproenca/dot-skills

    Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.

    214 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Rfc

    pproenca/dot-skills

    Create well-structured RFCs and technical proposals for software projects.

    214 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Dx Harness

    pproenca/dot-skills

    Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.

    214 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Language Spec Author

    pproenca/dot-skills

    Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Python Pep Author

    pproenca/dot-skills

    Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…

    214 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Adversarial Python

What does Adversarial Python do?

A skill your agent uses to gate Python code (floors 3.10+, rules verified through 3.14) with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 20…. Adversarial Python is an agent skill from pproenca/dot-skills.14) with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 20 decidable rules hunting two failure modes.

When should I use Adversarial Python?

Adversarial Python fits situations like: gate Python code (floors 3.10+; rules verified through 3.1; with a pass/fail adversarial review — a single blind reviewer subagent judges a diff; file set against 20 decidable rules hunting two failure modes.

How do I install Adversarial Python in Claude Code?

Run `npx skills add pproenca/dot-skills --skill adversarial-python -a claude-code`. Or copy the skill folder (skills/.experimental/adversarial-python in pproenca/dot-skills) into .claude/skills/adversarial-python in your project. Claude Code loads it when a task matches its description.

How do I install Adversarial Python in Codex?

Run `npx skills add pproenca/dot-skills --skill adversarial-python -a codex`. Or copy the skill folder (skills/.experimental/adversarial-python in pproenca/dot-skills) into .agents/skills/adversarial-python in your project. Codex loads it when a task matches its description.

Can I use Adversarial Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pproenca/dot-skills --skill adversarial-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adversarial-python, .gemini/skills/adversarial-python, .github/skills/adversarial-python and .opencode/skills/adversarial-python in your project.

What does Adversarial Python need to run?

SKILL.md names no scripts, command-line tools or credentials: Adversarial Python is instructions for the agent only. Our summary lists: Python 3.

Does Adversarial Python access the network?

SKILL.md names 1 domain. In commands or code: docs.python.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Adversarial Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Adversarial Python use?

Adversarial Python is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Adversarial Python use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Adversarial Python?

Skills that share tags, products or a category with Adversarial Python: jscpd Code Migration Tracker (kucherenko/jscpd, 6.3k stars), Inference Format Optimizer (a2ui-project/a2ui, 17k stars), Next Python Stdlib Upgrade Picker (RustPython/RustPython, 22k stars) and Code Review (unclecatvn/agent-skills, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adversarial Python?

pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.

Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.