ojowwalker77/claude-matrix/swift-swiftui
Claude Code and agent skill by ojowwalker77/claude-matrix
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user is working with Swift or SwiftUI, asks to "write SwiftUI code", "create iOS app", "fix SwiftUI view", "help with Swift", "SwiftUI architecture", "iOS development", or needs expert-level Swift/SwiftUI guidance with modern patterns and best practices.
Install
npx vskill@latest install ojowwalker77/claude-matrix/swift-swiftuiSKILL.md
Swift & SwiftUI Expert
Expert-level guidance for Swift and SwiftUI development with modern patterns, iOS 17+/macOS 14+ best practices, and production-ready code generation.
Core Principles
When writing Swift/SwiftUI code, ALWAYS follow these principles:
1. Modern State Management (iOS 17+)
Use `@Observable` macro instead of `ObservableObject`:
2. Property Wrapper Decision Tree
| Use Case | Property Wrapper | |
|---|---|---|
| Local view state (value types) | @State | |
| Two-way binding to parent state | @Binding | |
| Observable model (view owns) | @State + @Observable class | |
| Observable model (read-only child) | No wrapper (just pass object) | |
| Observable model (needs binding) | @Bindable | |
| Shared app-wide state | @Environment | |
| User defaults | @AppStorage | |
| Scene storage | @SceneStorage | |
| Focus state | @FocusState |
3. Architecture Patterns
For most apps: Modern MVVM with @Observable For large apps with teams: TCA (Composable Architecture) For simple views: No ViewModel needed
See references/architecture.md for detailed patterns.
Anti-Patterns to AVOID
State Management
Performance
Navigation
Code Generation Guidelines
When generating Swift/SwiftUI code:
- Target iOS 17+/macOS 14+ unless user specifies otherwise
- Use `@Observable` instead of
ObservableObject/@Published - Use NavigationStack instead of NavigationView
- Use `.task` instead of
.onAppearfor async work - Use Swift concurrency (async/await) instead of Combine for new code
- Make @State private always
- Prefer value types (structs, enums) over classes
- Use optionals correctly - never force unwrap without safety
- Handle errors explicitly - use do-catch, not try?
- Add accessibility - labels, hints, traits
Reference Documents
For detailed guidance, consult:
- `references/state-management.md` - Property wrappers, @Observable, data flow
- `references/architecture.md` - MVVM, TCA, Clean Architecture patterns
- `references/navigation.md` - NavigationStack, programmatic navigation, deep links
- `references/performance.md` - Lazy views, List optimization, render cycles
- `references/concurrency.md` - async/await, actors, MainActor, Task
- `references/testing.md` - Unit tests, ViewInspector, UI tests
- `references/accessibility.md` - VoiceOver, Dynamic Type, accessibility modifiers
- `references/swiftdata.md` - @Model, @Query, persistence patterns
- `references/anti-patterns.md` - Common mistakes and how to fix them
Examples
Basic View with State
ViewModel with @Observable
Navigation with Type-Safe Routes
Usage
This skill activates automatically when working with Swift/SwiftUI files or when the user mentions iOS/macOS/SwiftUI development.
Explicit invocation:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/swift-swiftui/SKILL.md
Popularity
- Repository stars
- 104
- Repository forks
- 9
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ojowwalker77/claude-matrix/swift-swiftui)