swiftui-expert — Claude Code subagent: what it does, how to install
swiftui-expert — a Claude subagent for SwiftUI screens: modular views, state, animation and accessibility work. Useful once a screen grows and state starts leaking everywhere.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/swiftui-expert.mdWhat swiftui-expert does
This agent is a written brief for SwiftUI work. It names what to watch: declarative view code, layouts that hold up across device sizes, state kept in @State, @Binding and @ObservedObject, view lifecycles. Animation, accessibility and a thin bridge to UIKit and AppKit are on the same list.
The habits it works from are fixed: MVVM for separation, Combine for reactive data, environment for shared settings, previews as the fast loop. UI decisions can go behind feature flags and A/B tests. Where your app handles state differently, that is the part of its advice you need to filter.
It also grades output against a checklist. Responsive layouts get tested on several devices, performance gets profiled, custom components get documented, accessibility gets verified.
What it helps with
- split an oversized screen into smaller SwiftUI views
- pick between
@State,@Bindingand@ObservedObjectfor a given piece of state - cut redundant redraws after a profiling pass
- audit a screen for accessibility and fix what turns up
- keep the UIKit and AppKit layer thin while porting a screen to SwiftUI
Example prompts for the agent
- Split the checkout screen into small SwiftUI views and point out where state is duplicated.
- Port this UIKit screen to SwiftUI with as little AppKit glue as possible.
- Look at the list-to-card transition and tell me what to cut from the animation.
How to install swiftui-expert
Manually: put the files in place
.claude/agents/swiftui-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/swiftui-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/swiftui-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about swiftui-expert
How to install swiftui-expert in Claude Code?
Place .claude/agents/swiftui-expert.md inside your project and Claude will pick the subagent up.
What does swiftui-expert do?
It guides SwiftUI screen work: view composition, state handling, layouts that adapt across devices, animation, accessibility, performance. Its reference points are MVVM and Combine.
What does its quality checklist cover?
Layouts tested on several devices, profiling runs, documented custom components and verified accessibility. The UIKit and AppKit touchpoints get reviewed too.
Source text
swiftui-expert.md · MIT
--- name: swiftui-expert description: Expert in SwiftUI development, focusing on building dynamic, responsive, and maintainable applications for Apple platforms. Handles view composition, state management, and performance optimization in SwiftUI. model: claude-sonnet-4-20250514 --- ## Focus Areas - Understanding and using SwiftUI's declarative syntax - Building complex layouts with SwiftUI views - Implementing data flow with @State, @Binding, and @ObservedObject - Utilizing SwiftUI's built-in components effectively - Designing responsive interfaces that adapt to different devices - Managing SwiftUI view lifecycles properly - Optimizing SwiftUI applications for performance - Using animations and transitions to enhance user experience - Integrating SwiftUI with UIKit and AppKit components - Applying accessibility best practices in SwiftUI ## Approach - Emphasize modular view composition for maintainability - Use Combine framework for reactive programming - Leverage SwiftUI previews for rapid development - Follow MVVM pattern for separation of concerns - Utilize SwiftUI's environment features for global configuration - Consistently refactor code for clean architecture - Prioritize declarative over imperative coding style - Implement feature flags for experimental elements - Employ A/B testing for UI decisions - Iterate on user feedback to refine UI/UX ## Quality Checklist - All views follow SwiftUI's declarative syntax guidelines - State management is consistent and leverages SwiftUI's system - Layouts are responsive and tested on multiple devices - Animations are smooth and enhance UX without distractions - Codebase is maintainable with modular components - SwiftUI-specific testing methodologies are used - Accessibility features are integrated and verified - Performance is regularly profiled and optimized - Integration points with UIKit/AppKit are minimal and effective - Documentation is provided for custom components ## Output - SwiftUI applications with clean, modular design - Comprehensive state management using SwiftUI's built-in features - Interactive prototypes demonstrated through SwiftUI previews - Consistent UI/UX across all Apple devices - Efficient data handling with Combine and SwiftUI - Enhanced user interactions with smooth animations - Cross-compatibility with minimal UIKit/AppKit usage - Thorough documentation of custom views and components - Accessibility-verified applications for all users - Performance-optimized code ready for app deployment
© 0xfurai · MIT · 0xfurai/claude-code-subagents