A stability-first Codex Agent Skill for building polished, accessible, native SwiftUI interfaces across Apple platforms.
This open-source Skill turns Apple Human Interface Guidelines principles into a repeatable workflow for iOS, iPadOS, macOS, watchOS, tvOS, and visionOS. It makes interaction correctness, adaptive layout, accessibility, motion, materials, and visual polish part of one review loop.
This project is independent and is not affiliated with Apple Inc.
SwiftUI interfaces often look convincing in a static preview while failing under rapid taps, interrupted gestures, Dynamic Type, keyboard focus, reduced effects, or window resizing. This Skill makes those failure modes explicit before adding decorative polish.
| Focus | What the Skill enforces |
|---|---|
| Stability | One owner for state, stable identity, cancellation, reversible gestures, and interruption-safe transitions |
| Native structure | Semantic controls, platform-appropriate navigation, adaptive containers, and system materials |
| Motion and materials | Causal, anchored, retargetable motion with Reduce Motion/Transparency fallbacks |
| Accessibility | Dynamic Type, VoiceOver, keyboard/focus, contrast, RTL, and differentiated non-color cues |
| Evidence | Build, runtime abuse, visual matrix, performance, and Apple Fidelity review gates |
-
Install this directory as a Codex Skill at:
<Codex skills directory>/design-swiftui-interfaces -
Invoke it in Codex:
$design-swiftui-interfaces -
Tell the agent the target platform, deployment range, primary task, supported sizes/input methods, and whether the
standardorexpressiveprofile is intended.
The Skill can review SwiftUI code on any machine. Building and runtime verification of Apple targets still requires the applicable Xcode toolchain, SDKs, previews, simulators, or devices.
Use for settings, productivity, education, medical, finance, enterprise, and other task-focused interfaces. It favors familiar hierarchy, quiet surfaces, restrained motion, system materials, and high information clarity.
Use when a product explicitly needs colorful glass, connected morphs, richer depth, scroll-reactive chrome, ambient color, or cinematic transitions. It changes intensity—not semantics—and requires a quiet content layer, reduced-effects alternatives, and effect-specific performance evidence.
Run the conservative static risk scan from this repository:
python3 scripts/audit_swiftui_ui.py path/to/swiftui-project --profile standard
python3 scripts/audit_swiftui_ui.py path/to/swiftui-project --profile expressive --fail-on highThe scanner is a review aid, not proof of a correct build or accessible interaction. Follow the validation matrix and report the exact schemes, SDKs, devices/simulators, accessibility settings, gestures, and performance paths that were tested.
- SKILL.md — the agent workflow and hard rules.
- Design foundations — Apple principles translated into implementation decisions.
- Stability — state ownership, async cancellation, gestures, navigation, and interruption.
- Motion and materials — springs, transitions, Liquid Glass, blur, shaders, haptics, and fallbacks.
- Platform layout — iPhone, iPad, Mac, Watch, TV, and Vision layout differences.
- Accessibility — Dynamic Type, VoiceOver, focus, contrast, and reduced effects.
- Validation — hard gates, runtime abuse tests, visual matrix, performance, and the 100-point rubric.
- Source index — Apple documentation, WWDC sessions, and community research.
SKILL.md
agents/openai.yaml
references/
scripts/audit_swiftui_ui.py
This repository contains portable Skill guidance and a dependency-free static audit only. Xcode projects, DerivedData, build products, simulator data, screenshots, archives, credentials, personal data, and machine-specific paths are intentionally excluded from version control.
Read CONTRIBUTING.md before opening a pull request. Use Discussions for design questions, platform patterns, and profile feedback; use Issues for reproducible defects and focused feature requests.
Released under the MIT License.