Individual skill
adversarial-python
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.
skills/.experimental/adversarial-python/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 9,548 bytesSKILL.mdcore · 9,548 bytesSKILL.mdcore · 9,548 bytesSKILL.mdcore · 9,548 bytesassets/templates/verdict.mddoc · 1,733 bytesgotchas.mddoc · 4,105 bytesmetadata.jsonasset · 1,414 bytesreferences/_sections.mddoc · 5,205 bytesreferences/alt-collapse-passthrough-layers.mddoc · 2,202 bytesreferences/alt-compose-over-concrete-inheritance.mddoc · 2,477 bytesreferences/alt-function-over-single-method-class.mddoc · 2,383 bytesreferences/alt-no-single-impl-interfaces.mddoc · 2,177 bytesreferences/disp-match-over-isinstance-ladders.mddoc · 2,309 bytesreferences/disp-registry-over-branch-ladders.mddoc · 3,103 bytesreferences/disp-split-boolean-switch-params.mddoc · 2,123 bytesreferences/disp-strenum-over-string-states.mddoc · 2,063 bytesreferences/flow-no-silent-broad-except.mddoc · 2,411 bytesreferences/flow-taskgroup-over-orphan-tasks.mddoc · 2,272 bytesreferences/model-dataclass-over-boilerplate.mddoc · 2,379 bytesreferences/model-shape-the-data-clump.mddoc · 2,152 bytesreferences/model-typed-boundary-payloads.mddoc · 2,224 bytesreferences/reviewer-prompt.mddoc · 8,161 bytesreferences/std-aware-utc-datetimes.mddoc · 1,909 bytesreferences/std-no-hand-rolled-batteries.mddoc · 2,346 bytesreferences/std-pathlib-over-ospath.mddoc · 1,946 bytesreferences/std-zip-strict-independent-sources.mddoc · 1,826 bytesreferences/typing-builtin-generics-and-unions.mddoc · 1,748 bytesreferences/typing-pep695-generics.mddoc · 1,970 bytesreferences/typing-self-over-typevar-fluent.mddoc · 1,944 bytes
Read excerpt
# 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.