Individual skill
adversarial-elixir
Use this skill to gate Elixir, OTP, Ecto, and Phoenix code with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 19 decidable rules that catch architecture ported from an alien paradigm, covering enterprise layering (repository wrappers over Ecto, service-object tiers, DI behaviours with a single implementation, logic trapped in effectful callbacks), processes as objects (GenServer-per-entity, Agents as mutable variables, leaked message protocols, singleton managers), anemic data (bare maps as entities, boolean-flag state, hand-rolled type dispatch, 32+-field structs), defensive control flow (raise/rescue as branching, nil-guard swallowing, raw input past the boundary), transliterated loops, and needless metaprogramming (macro DSLs for data, use-as-import, compile-time coupling). Trigger it before merging Elixir work, or to check agent-authored code. It renders verdicts only, never fixes; Ecto-dependent rules go N/A without Ecto.
skills/.experimental/adversarial-elixir/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Instructions only
- 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)
- 221
- 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
- data 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 · 8,452 bytesSKILL.mdcore · 8,452 bytesassets/templates/verdict.mddoc · 1,568 bytesgotchas.mddoc · 3,148 bytesmetadata.jsonasset · 1,469 bytesreferences/_sections.mddoc · 3,619 bytesreferences/arch-context-over-service-objects.mddoc · 2,004 bytesreferences/arch-delete-repository-over-ecto.mddoc · 2,105 bytesreferences/arch-drop-di-behaviour-single-impl.mddoc · 2,331 bytesreferences/arch-functional-core-imperative-shell.mddoc · 2,457 bytesreferences/flow-assertive-over-defensive.mddoc · 2,411 bytesreferences/flow-no-exceptions-for-control.mddoc · 2,994 bytesreferences/flow-normalize-at-boundary.mddoc · 2,166 bytesreferences/iter-named-combinator-over-manual-loop.mddoc · 2,567 bytesreferences/meta-functions-not-macro-dsl.mddoc · 2,138 bytesreferences/meta-no-compile-time-coupling.mddoc · 1,989 bytesreferences/meta-use-is-not-import.mddoc · 1,909 bytesreferences/proc-consolidate-interface.mddoc · 1,921 bytesreferences/proc-no-process-as-variable.mddoc · 2,240 bytesreferences/proc-no-singleton-manager.mddoc · 2,197 bytesreferences/proc-not-objects.mddoc · 2,287 bytesreferences/reviewer-prompt.mddoc · 6,466 bytesreferences/type-protocol-over-type-dispatch.mddoc · 2,295 bytesreferences/type-split-god-struct.mddoc · 1,882 bytesreferences/type-struct-over-bare-map.mddoc · 1,963 bytesreferences/type-tagged-state-over-flags.mddoc · 2,097 bytes
Read excerpt
# Adversarial Elixir Gate
An Elixir/OTP/Ecto/Phoenix review gate — 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 one failure mode: **code that imported the wrong mental model onto the BEAM** — OO/enterprise layering, processes treated as objects, anemic data, defensive control flow, transliterated loops, and needless metaprogramming. They are grounded in the official Elixir anti-pattern catalogs and each carries an **Evidence of violation** paragraph so a reviewer can decide PASS/FAIL/N/A from artifact evidence alone. Judgment-call refactor guidance stays in the advisory sibling `staff-level-elixir`.
## When to Apply
- An Elixir diff, feature, or PR is about to merge and needs an objective PASS/FAIL, not advisory feedback.
- An agent (Claude, Codex) authored the code and you want an independent check that it did not reproduce OO habits — repository wrappers over Ecto, `*Service`/`*Manager` tiers, a GenServer per entity, DI behaviours for a single implementation, raise/rescue as an `if`.
- Code ported from Java/Ruby/Python (or written by developers newer to the BEAM) needs auditing for paradigm fit before it calcifies.
- A refactor claims to have "made it idiomatic" and you want the claim verified, not assumed.
Do not apply to non-Elixir codebases (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"), or when the user wants explanations and refactors rather than a verdict — that is `staff-level-elixir`'s job. `arch-delete-repository-over-ecto` goes N/A when the target has no Ecto; `flow-normalize-at-boundary` goes N/A when the target has no external-input path. Remedies newer than the project's Elixir version are judged against the nearest available remedy — the reviewer prompt carries the version-gate table.