forexgod21/yvyc-claude-skills/swift-ios-expert
Claude Code and agent skill by forexgod21/yvyc-claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Use for Swift, SwiftUI, UIKit, iOS, iPadOS, macOS, watchOS, tvOS, and visionOS development — Swift 6 concurrency (async/await, actors, Sendable, isolation), SwiftUI state graph (@State, @Binding, @Observable, @Environment), UIKit interop, SwiftData, Core Data, Combine, property wrappers, Swift Package Manager, XCTest, Swift Testing, Instruments profiling, code signing, provisioning profiles, and App Store Connect submission. Triggers on mentions of Swift, SwiftUI, UIKit, iOS, Xcode, .swift, actor, @Observable, SwiftData, TestFlight, App Store, or Apple platform development.
Install
npx vskill@latest install forexgod21/yvyc-claude-skills/swift-ios-expertSKILL.md
The same SKILL.md was published earlier as forexgod21/yvyc-claude-skills/swift-ios-expert.
Swift / Apple Platforms Expert
Load Order
Read shared-kernel/SKILL.md first.
Core Competencies
Swift 6 Concurrency
async/awaitsemantics, suspension points, cooperative cancellation- Actors: isolation boundaries,
nonisolatedmethods, reentrancy @MainActorfor UI-bound types,@globalActorfor custom isolation domainsSendableconformance: value types, final classes with immutable state,@unchecked Sendableas last resort with documented justification- Structured concurrency:
TaskGroup,async let, cancellation propagation AsyncSequenceandAsyncStreamfor push-based APIs
SwiftUI State Graph
@State— owned, local, value-type state@Binding— borrowed reference to parent's state@Observablemacro (iOS 17+) — replacesObservableObject+@Published@Environment— dependency injection through the view tree@Bindable— two-way binding to an@Observableclass- Avoid mixing
@StateObjectand@Observablein the same hierarchy
UIKit Interop
UIViewRepresentable/UIViewControllerRepresentablefor wrapping UIKit in SwiftUIUIHostingControllerfor embedding SwiftUI in UIKit- Coordinator pattern for delegate callbacks across the bridge
- Know when to drop to UIKit: complex text editing, camera UI, high-frequency animations, legacy code
SwiftData
@Modelmacro,ModelContainer,ModelContextModelContextis not Sendable — one per actor, passPersistentIdentifieracross boundaries- Migrations: lightweight (schema additive) vs custom (
SchemaMigrationPlan) @Queryfor SwiftUI-integrated fetches,FetchDescriptorfor imperative queries
Memory Management
- ARC, strong/weak/unowned references
[weak self]in escaping closures, Combine subscriptions, and Tasks that outlive their creator- Retain cycles detected via Instruments → Leaks and Debug Memory Graph
Task { [weak self] in ... }for long-lived async work
App Lifecycle
@mainApp entry, Scene phases (active,inactive,background)- Background tasks:
BGAppRefreshTask,BGProcessingTask, declared in Info.plist - Push notifications: APNs token registration, UNUserNotificationCenter, notification service extension
Version Verification (Required First Step)
Before writing Swift code, confirm:
swift-tools-versioninPackage.swiftOR iOS Deployment Target in project settings- Xcode version (Xcode 16+ for Swift 6 language mode)
- Is strict concurrency enabled? (
SWIFT_STRICT_CONCURRENCY=complete) - Is the Swift language mode 5 or 6? (project → build settings → Swift Language Version)
Common Failure Modes
| Symptom | Root Cause | |
|---|---|---|
| "Main actor-isolated property cannot be referenced from non-isolated context" | Accessing @MainActor state from background Task — hop to MainActor or mark method nonisolated appropriately | |
| Retain cycle via Combine | Missing [weak self] in .sink closure | |
| SwiftData crash: "Context was used on wrong thread" | ModelContext crossed actor boundary — use PersistentIdentifier and re-fetch | |
| SwiftUI view not updating | Mutating class property not marked @Observable, or mutating struct without @State | |
| Force-unwrap crash in prod | ! on optional without guarantee — use guard let or if let | |
| Preview crash with dependencies | No mock injected for @Environment or init dependency | |
| "Sending value of non-Sendable type" (Swift 6) | Passing reference type across actor boundary without conformance |
Non-Negotiables
- Compiles clean under
-warnings-as-errorsand strict concurrency - No force-unwraps in production code (test code acceptable with justification)
- Every SwiftUI view has a working
#Preview - Every public API is documented with
///doc comments - Every navigation stack handles deep links and state restoration
- Every network call has explicit timeout and cancellation
- No
print()in shipped code — useLoggerfromos.log
Deliverables
Observable Model (Swift 6)
SwiftUI View Consuming Observable
SwiftData Model
Testing Standard
- XCTest or Swift Testing (Xcode 16+ prefers Swift Testing)
- Test pyramid: many unit tests, some integration, few UI tests
XCUIApplicationlaunch arguments for test fixtures, never real network- Snapshot tests for critical SwiftUI views (via point-free's snapshot-testing)
- Profile with Instruments before optimizing — guess and optimize is forbidden
Reference Links to Verify
- https://developer.apple.com/documentation/ (primary)
- https://www.swift.org/documentation/ (language reference)
- WWDC session videos for the feature in question (authoritative on rationale)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdev/swift-ios-expert/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/forexgod21/yvyc-claude-skills/swift-ios-expert)