Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

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.

Review Protocol

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

Two preconditions before step 1 — both exist because their violation is the gate family's recorded field-failure mode (July 2026: gates run as cleanup drivers on a moving target rendered zero verdicts while the diff grew to 33 files):

  • Frozen target. Dispatch only against a fixed ref — a commit SHA, stash, or saved diff — recorded as the target manifest. If the code under review is still changing (the worktree keeps collecting edits, other agents are active on it), do not dispatch. A target change while the reviewer is in flight voids the run: report GATE VOID — target changed in place of a verdict and re-dispatch against the new frozen state. A dispatched gate must always end in a rendered verdict, a GATE NOT APPLICABLE, or a recorded void — never silence, which is indistinguishable from "reviewed".
  • Verdicts, not cleanup. This gate is a terminal check on finished work. "Run the gate and fix everything aggressively" inverts the contract and is the documented path to scope explosion: implement first, freeze, then gate. After a FAIL, the caller applies fixes within the original target only, and the re-gate dispatches a fresh blind reviewer against the same target manifest — the surface never widens between rounds; new code means a new gate invocation with its own manifest.

When other agents may mutate the workspace mid-review, the reviewer reads the rules from an immutable snapshot (e.g. git archive <ref> <skill-dir> | tar -x -C "$TMPDIR") rather than the live checkout — and skill directories are read-only infrastructure, excluded from every cleanup or fix scope.

  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. Record the Swift toolchain version and minimum deployment target (from Package.swift, the Xcode project, or availability annotations) — several rules version-gate on them. Include the repo root in the target description — update-pass-minimal-data, state-own-models-in-state, and update-cache-expensive-derivations can require reading whole files beyond the diff hunks.
  2. Load the rules. Read references/_sections.md and every rule file in references/ (all state-*.md, update-*.md, identity-*.md, task-*.md, list-*.md, anim-*.md, access-*.md files).
  3. Compose the reviewer prompt. Fill references/reviewer-prompt.md with the rules, the target, and the toolchain/deployment facts. The composed prompt must be fully self-contained — a reviewer sees no conversation history, so nothing may refer to context outside the prompt.
  4. Dispatch one blind reviewer. Launch a single Task subagent whose e
Полный SKILL.md на GitHub

Установить adversarial-swift-ui в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/templates/verdict.mdgotchas.mdmetadata.jsonreferences/_sections.mdreferences/access-button-not-ontapgesture.mdreferences/access-button-title-and-icon.mdreferences/access-representation-for-custom-controls.mdreferences/access-scaledmetric-custom-spacing.mdreferences/access-semantic-fonts-and-colors.mdreferences/access-style-protocols-for-custom-controls.mdreferences/anim-body-scoped-animation-in-generic-containers.mdreferences/anim-builtin-effects-over-custom-animatable.mdreferences/identity-anylayout-over-container-branches.mdreferences/identity-branch-free-modifier-helpers.mdreferences/identity-branch-in-modifier-not-around-view.mdreferences/list-constant-foreach-view-count.mdreferences/list-no-anyview-rows.mdreferences/list-no-geometry-feedback-loop.mdreferences/list-ongeometrychange-over-georeader.mdreferences/list-visualeffect-for-render-transforms.mdreferences/reviewer-prompt.mdreferences/state-callasfunction-env-closures.mdreferences/state-guard-task-id-model-reinit.mdreferences/state-no-highfreq-environment-values.mdreferences/state-no-initialvalue-from-params.mdreferences/state-observable-not-observableobject.mdreferences/state-own-models-in-state.mdreferences/task-concurrent-offload-cpu-work.mdreferences/task-id-for-async-state-reactions.mdreferences/task-modifier-not-onappear-task.mdreferences/task-scalar-ids-for-onchange.mdreferences/update-cache-expensive-derivations.mdreferences/update-no-large-structs-on-rows.mdreferences/update-no-side-effects-in-view-init.mdreferences/update-pass-minimal-data.mdreferences/update-subview-structs-not-computed-vars.md

FAQ

Что делает скилл 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.

Как установить скилл adversarial-swift-ui?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл adversarial-swift-ui запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить adversarial-swift-ui с