swiftui-expert-skill▌
avdlee/swiftui-agent-skill · updated Apr 8, 2026
Expert SwiftUI code review, refactoring, and implementation guidance with iOS 26+ and macOS support.
- ›Covers state management, view composition, performance optimization, and modern SwiftUI patterns across iOS 15+ through iOS 26+
- ›Flags deprecated APIs and suggests modern replacements; gates version-specific features with #available and fallbacks
- ›Addresses lists, layouts, animations, accessibility, Swift Charts, and platform-specific patterns (macOS scenes, Liquid Glass)
- ›Enforces co
SwiftUI Expert Skill
Operating Rules
- Consult
references/latest-apis.mdat the start of every task to avoid deprecated APIs - Prefer native SwiftUI APIs over UIKit/AppKit bridging unless bridging is necessary
- Focus on correctness and performance; do not enforce specific architectures (MVVM, VIPER, etc.)
- Encourage separating business logic from views for testability without mandating how
- Follow Apple's Human Interface Guidelines and API design patterns
- Only adopt Liquid Glass when explicitly requested by the user (see
references/liquid-glass.md) - Present performance optimizations as suggestions, not requirements
- Use
#availablegating with sensible fallbacks for version-specific APIs
Task Workflow
Review existing SwiftUI code
- Read the code under review and identify which topics apply
- Flag deprecated APIs (compare against
references/latest-apis.md) - Run the Topic Router below for each relevant topic
- Validate
#availablegating and fallback paths for iOS 26+ features
Improve existing SwiftUI code
- Audit current implementation against the Topic Router topics
- Replace deprecated APIs with modern equivalents from
references/latest-apis.md - Refactor hot paths to reduce unnecessary state updates
- Extract complex view bodies into separate subviews
- Suggest image downsampling when
UIImage(data:)is encountered (optional optimization, seereferences/image-optimization.md)
Implement new SwiftUI feature
- Design data flow first: identify owned vs injected state
- Structure views for optimal diffing (extract subviews early)
- Apply correct animation patterns (implicit vs explicit, transitions)
- Use
Buttonfor all tappable elements; add accessibility grouping and labels - Gate version-specific APIs with
#availableand provide fallbacks
Topic Router
Consult the reference file for each topic relevant to the current task:
| Topic | Reference |
|---|---|
| State management | references/state-management.md |
| View composition | references/view-structure.md |
| Performance | references/performance-patterns.md |
| Lists and ForEach | references/list-patterns.md |
| Layout | references/layout-best-practices.md |
| Sheets and navigation | references/sheet-navigation-patterns.md |
| ScrollView | references/scroll-patterns.md |
| Focus management | references/focus-patterns.md |
| Animations (basics) | references/animation-basics.md |
| Animations (transitions) | references/animation-transitions.md |
| Animations (advanced) | references/animation-advanced.md |
| Accessibility | references/accessibility-patterns.md |
| Swift Charts | references/charts.md |
| Charts accessibility | references/charts-accessibility.md |
| Image optimization | references/image-optimization.md |
| Liquid Glass (iOS 26+) | references/liquid-glass.md |
| macOS scenes | references/macos-scenes.md |
| macOS window styling | references/macos-window-styling.md |
| macOS views | references/macos-views.md |
| Deprecated API lookup | references/latest-apis.md |
Correctness Checklist
These are hard rules -- violations are always bugs:
-
@Stateproperties areprivate -
@Bindingonly where a child modifies parent state - Passed values never declared as
@Stateor@StateObject(they ignore updates) -
@StateObjectfor view-owned objects;@ObservedObjectfor injected - iOS 17+:
@Statewith@Observable;@Bindablefor injected observables needing bindings -
ForEachuses stable identity (never.indicesfor dynamic content) - Constant number of views per
ForEachelement -
.animation(_:value:)always includes thevalueparameter -
@FocusStateproperties areprivate - No redundant
@FocusStatewrites inside tap gesture handlers on.focusable()views - iOS 26+ APIs gated with
#availableand fallback provided -
import Chartspresent in files using chart types
References
references/latest-apis.md-- Read first for every task. Deprecated-to-modern API transitions (iOS 15+ through iOS 26+)references/state-management.md-- Property wrappers, data flow,@Observablemigrationreferences/view-structure.md-- View extraction, container patterns,@ViewBuilderreferences/performance-patterns.md-- Hot-path optimization, update control,_logChanges()references/list-patterns.md-- ForEach identity, Table (iOS 16+), inline filtering pitfallsreferences/layout-best-practices.md-- Layout patterns, GeometryReader alternativesreferences/accessibility-patterns.md-- VoiceOver, Dynamic Type, grouping, traitsreferences/animation-basics.md-- Implicit/explicit animations, timing, performancereferences/animation-transitions.md-- View transitions,matchedGeometryEffect,Animatablereferences/animation-advanced.md-- Phase/keyframe animations (iOS 17+),@Animatablemacro (iOS 26+)references/charts.md-- Swift Charts marks, axes, selection, styling, Chart3D (iOS 26+)references/charts-accessibility.md-- Charts VoiceOver, Audio Graph, fallback strategiesreferences/sheet-navigation-patterns.md-- Sheets, NavigationSplitView, Inspectorreferences/scroll-patterns.md-- ScrollViewReader, programmatic scrollingreferences/focus-patterns.md-- Focus state, focusable views, focused values, default focus, common pitfallsreferences/image-optimization.md-- AsyncImage, downsampling, cachingreferences/liquid-glass.md-- iOS 26+ Liquid Glass effects and fallback patternsreferences/macos-scenes.md-- Settings, MenuBarExtra, WindowGroup, multi-windowreferences/macos-window-styling.md-- Toolbar styles, window sizing, Commandsreferences/macos-views.md-- HSplitView, Table, PasteButton, AppKit interop
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★36 reviews- ★★★★★Sophia Verma· Dec 28, 2024
I recommend swiftui-expert-skill for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Shikha Mishra· Dec 16, 2024
We added swiftui-expert-skill from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Isabella Rao· Dec 4, 2024
swiftui-expert-skill reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Arjun Gonzalez· Dec 4, 2024
swiftui-expert-skill fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Zara Flores· Nov 23, 2024
We added swiftui-expert-skill from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Sophia Thomas· Nov 19, 2024
Useful defaults in swiftui-expert-skill — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Yash Thakker· Nov 7, 2024
swiftui-expert-skill reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Dhruvi Jain· Oct 26, 2024
swiftui-expert-skill is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Omar Rahman· Oct 14, 2024
Keeps context tight: swiftui-expert-skill is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★William Malhotra· Oct 10, 2024
Registry listing for swiftui-expert-skill matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 36