Individual skill
adversarial-swift-ui
Use this skill to gate SwiftUI code with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 31 decidable rules — data modeling and observation (@Observable over ObservableObject, @State ownership, task(id:) re-init guards, environment closures and high-frequency values), view update cost (computed-var extraction, whole-model dependencies, init side effects, uncached derivations, structs on rows), structural identity (applyIf branching, AnyLayout), task lifecycle (.task over onAppear+Task, scalar ids, @concurrent offloading), lists and geometry (ForEach view count, AnyView rows, GeometryReader measurement, feedback loops, visualEffect), animation scope, and accessibility (button semantics, style protocols, accessibilityRepresentation, semantic styling, ScaledMetric spacing). Trigger before merging SwiftUI work or to audit agent-authored views. Verdicts only, never fixes; targets without a SwiftUI surface abort.
skills/.experimental/adversarial-swift-ui/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)
- 223
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- design Derived category
- data Derived category
- security Derived category
- design-interface 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 · 11,437 bytesSKILL.mdcore · 11,437 bytesassets/templates/verdict.mddoc · 2,101 bytesgotchas.mddoc · 6,999 bytesmetadata.jsonasset · 951 bytesreferences/_sections.mddoc · 4,342 bytesreferences/access-button-not-ontapgesture.mddoc · 2,263 bytesreferences/access-button-title-and-icon.mddoc · 2,667 bytesreferences/access-representation-for-custom-controls.mddoc · 3,373 bytesreferences/access-scaledmetric-custom-spacing.mddoc · 4,032 bytesreferences/access-semantic-fonts-and-colors.mddoc · 2,651 bytesreferences/access-style-protocols-for-custom-controls.mddoc · 3,395 bytesreferences/anim-body-scoped-animation-in-generic-containers.mddoc · 2,825 bytesreferences/anim-builtin-effects-over-custom-animatable.mddoc · 2,503 bytesreferences/identity-anylayout-over-container-branches.mddoc · 3,185 bytesreferences/identity-branch-free-modifier-helpers.mddoc · 3,580 bytesreferences/identity-branch-in-modifier-not-around-view.mddoc · 4,131 bytesreferences/list-constant-foreach-view-count.mddoc · 3,441 bytesreferences/list-no-anyview-rows.mddoc · 3,012 bytesreferences/list-no-geometry-feedback-loop.mddoc · 2,843 bytesreferences/list-ongeometrychange-over-georeader.mddoc · 2,855 bytesreferences/list-visualeffect-for-render-transforms.mddoc · 3,802 bytesreferences/reviewer-prompt.mddoc · 6,450 bytesreferences/state-callasfunction-env-closures.mddoc · 3,117 bytesreferences/state-guard-task-id-model-reinit.mddoc · 2,630 bytesreferences/state-no-highfreq-environment-values.mddoc · 3,341 bytesreferences/state-no-initialvalue-from-params.mddoc · 2,503 bytesreferences/state-observable-not-observableobject.mddoc · 6,116 bytesreferences/state-own-models-in-state.mddoc · 3,445 bytesreferences/task-concurrent-offload-cpu-work.mddoc · 5,671 bytesreferences/task-id-for-async-state-reactions.mddoc · 2,568 bytesreferences/task-modifier-not-onappear-task.mddoc · 2,805 bytesreferences/task-scalar-ids-for-onchange.mddoc · 2,872 bytesreferences/update-cache-expensive-derivations.mddoc · 5,362 bytesreferences/update-no-large-structs-on-rows.mddoc · 6,247 bytesreferences/update-no-side-effects-in-view-init.mddoc · 3,531 bytesreferences/update-pass-minimal-data.mddoc · 4,204 bytesreferences/update-subview-structs-not-computed-vars.mddoc · 6,275 bytes
Read excerpt
# Adversarial SwiftUI Gate
A SwiftUI architecture 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 are filtered down to the checks a reviewer can decide from code evidence alone. The gate judges the failure modes agents and experienced-but-not-expert developers actually produce: legacy observation stacks, identity-destroying conditionals, work attached to the wrong lifecycle point, laziness-defeating list construction, animations that leak across generic content, and controls that opt out of the system's accessibility semantics.
## When to Apply
- A SwiftUI diff, feature, or PR is about to merge and needs an objective PASS/FAIL, not advisory feedback.
- An agent (Claude, Codex) authored the views and you want an independent check that it is not reproducing pre-Observation idioms (`ObservableObject`/`@StateObject`, `.onAppear { Task { ... } }`, `AnyView` rows, `GeometryReader`-to-measure) or identity-resetting conditionals (`applyIf` helpers, container-type switches).
- UIKit-era screens are being ported to SwiftUI and the new surface needs auditing against the framework's update mechanics (subview boundaries, minimal dependencies, cached derivations, stable identity).
- Accessibility and platform-convention compliance must be verified, not assumed — icon-only buttons, tap gestures posing as controls, primitives rebuilt where a style protocol exists, silent Canvas controls, hardcoded fonts, fixed spacing around text.
Do not apply to targets with no SwiftUI surface — server-side Swift, CLI tools, non-UI packages (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"). General Swift language quality (concurrency structure, API design, control flow) is the sibling `adversarial-swift` gate's job, not this one's. Rules whose remedy needs a newer toolchain or deployment target than the project's are N/A, not FAIL — the reviewer prompt carries the version-gate table.