swiftui-ui-patternsBest practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.
Install via ClawdBot CLI:
clawdbot install Dimillian/swiftui-ui-patternsChoose a track based on your goal:
rg "TabView\(" or similar, then read the closest SwiftUI view.references/components-index.md and follow its guidance.references/app-scaffolding-wiring.md to wire TabView + NavigationStack + sheets.AppTab and RouterPath based on the provided skeletons.@State, @Binding, @Observable, @Environment) and avoid unnecessary view models..task and explicit loading/error states..sheet(item:) over .sheet(isPresented:) when state represents a selected model. Avoid if let inside a sheet body. Sheets should own their actions and call dismiss() internally instead of forwarding onCancel/onConfirm closures.@Environment..task and explicit state enum if needed.Use references/components-index.md as the entry point. Each component reference should include:
@State private var selectedItem: Item?
.sheet(item: $selectedItem) { item in
EditItemSheet(item: item)
}
struct EditItemSheet: View {
@Environment(\.dismiss) private var dismiss
@Environment(Store.self) private var store
let item: Item
@State private var isSaving = false
var body: some View {
VStack {
Button(isSaving ? "Savingβ¦" : "Save") {
Task { await save() }
}
}
}
private func save() async {
isSaving = true
await store.save(item)
dismiss()
}
}
references/.md .references/components-index.md with the new entry.Generated Mar 1, 2026
A startup building a new iOS app from scratch can use this skill to scaffold a modern SwiftUI project with TabView and NavigationStack, ensuring a clean architecture from day one. It helps implement best practices like async loading and sheet patterns, reducing technical debt and speeding up development.
An established company with an older iOS app can apply this skill to refactor specific screens or components to SwiftUI, following guidelines for state management and composition. It aids in gradually modernizing the UI while maintaining consistency with existing patterns where necessary.
Developers creating interactive learning apps for iOS can leverage the component references and sheet patterns to build modular, accessible views. The skill supports designing tab-based navigation and async data handling, ideal for apps with multiple content sections and user interactions.
An e-commerce business updating its iOS app can use this skill to improve UI components like product lists and detail screens with SwiftUI best practices. It enables efficient state management and sheet-driven workflows for tasks like editing cart items or user settings.
Companies offering subscription-based iOS development tools or platforms can integrate this skill to provide clients with standardized SwiftUI patterns, reducing support costs and improving code quality. Revenue is generated through monthly or annual licensing fees.
Independent iOS developers can use this skill to deliver high-quality, maintainable SwiftUI projects for clients, positioning themselves as experts in modern UI practices. Revenue comes from project-based contracts or hourly rates, with faster turnaround due to reusable patterns.
Large organizations with internal iOS teams can adopt this skill to standardize app development across departments, ensuring consistency and reducing onboarding time for new developers. Revenue is indirect, realized through cost savings and improved app performance.
π¬ Integration Tip
Integrate this skill by first reviewing the component references and applying the quick-start workflows to align with your project's existing structure, ensuring smooth adoption of SwiftUI patterns.
Full Windows desktop control. Mouse, keyboard, screenshots - interact with any Windows application like a human.
Control Android devices via ADB with support for UI layout analysis (uiautomator) and visual feedback (screencap). Use when you need to interact with Android apps, perform UI automation, take screenshots, or run complex ADB command sequences.
Build, test, and ship iOS apps with Swift, Xcode, and App Store best practices.
Control macOS GUI apps visually β take screenshots, click, scroll, type. Use when the user asks to interact with any Mac desktop application's graphical interface.
Swift Concurrency review and remediation for Swift 6.2+. Use when asked to review Swift Concurrency usage, improve concurrency compliance, or fix Swift concurrency compiler errors in a feature or file.
Write safe Swift code avoiding memory leaks, optional traps, and concurrency bugs.