maroffo/claude-forge/apple-swift
Claude Code and agent skill by maroffo/claude-forge
- community
Checking that the SKILL.md file is still in the repository.
Apple platform development with Swift, SwiftUI, async/await, and performance. Use when working with .swift files, Package.swift, Xcode projects, or building for iOS/macOS/watchOS/visionOS.
Install
npx vskill@latest install maroffo/claude-forge/apple-swiftSKILL.md
ABOUTME: Apple platform guide, Swift, SwiftUI, concurrency, testing, performance
ABOUTME: Conventions, strict concurrency rules, MVVM + DI patterns, review checklists
Apple Platform Development
Quick Reference
See also: _AST_GREP.md, _PATTERNS.md, source-control, references/
Version (determine, don't assume)
See ../_LANG_COMMON.md. Fetch the truth:
Pre-Commit Verification (MANDATORY)
make check && make test-e2e must pass (enforced by the pre-commit-gate hook; see ../_LANG_COMMON.md). What make check expands to for an Apple project:
Pick <booted device> from xcrun simctl list devices | grep Booted (do not hardcode a simulator model).
SwiftUI
Property Wrappers
| Wrapper | Use | |
|---|---|---|
@State | View-owned values, @Observable | |
@Binding | Two-way to parent | |
@Bindable | Two-way to @Observable props | |
@Environment | System/app values | |
@StateObject | View-owned ObservableObject (legacy) |
View property order: @Environment, let, @State/@Binding, computed, init, body, private methods
View sizing: <100 lines = single view; 100-200 = extract subviews; >200 = multiple files; business logic = @Observable VM; network/DB = repository pattern
For NavigationStack, SwiftData, MVVM, and DI patterns, see references/swiftui-patterns.md.
Concurrency
Common Fixes
| Error | Fix | |
|---|---|---|
| Main actor isolation | Add @MainActor to class/func | |
| Non-isolated access | Mark nonisolated | |
| Sendable violation | Add @unchecked Sendable or fix | |
| Protocol async | Require async in protocol | |
| Closure capture | Use @Sendable closure |
When to use what
| Use Case | Choice | |
|---|---|---|
| One-shot network | async/await | |
| Parallel fetches | async let / TaskGroup | |
| Real-time streams | Combine / AsyncStream | |
| UI events, debounce | Combine |
UI updates run on @MainActor, cross-actor value types are Sendable, and long-running work checks Task.isCancelled: under Swift 6 strict concurrency the first two are compile errors, the third is wasted work that nothing reports.
For MainActor, parallel execution, and actor patterns, see references/concurrency-patterns.md.
Architecture
MVVM with @Observable: @Observable @MainActor final class VM with private(set) properties, injected service protocols, async load methods with defer { isLoading = false }.
DI: Protocol-based with EnvironmentKey for SwiftUI injection.
Coordinator pattern: For flow-heavy apps, lift navigation state out of views into a Coordinator type owning a NavigationPath (or route enum) and exposing intents.
Testing (Swift Testing): @Suite, @Test, #expect. Parameterized with arguments:. Mock via protocol injection. XCTest still valid where needed (UI tests, legacy targets).
For full code examples, see references/swiftui-patterns.md and references/swift6-patterns.md.
Review Checklists
Concurrency: MainActor for UI, Sendable for cross-actor data, task cancellation handled, no data races
SwiftUI: @Observable over ObservableObject where available, NavigationStack over NavigationView, .task over .onAppear + Task, LazyVStack for long lists
Critical: Force unwrap without safety, UI updates off MainActor, data races, retain cycles
Major: Legacy ObservableObject when @Observable fits, NavigationView in new code
Detailed References
references/swift6-patterns.md- Strict concurrency migration, Sendable, actors, macrosreferences/swiftui-patterns.md- NavigationStack, SwiftData, MVVM, dependency injectionreferences/concurrency-patterns.md- async/await, TaskGroup, MainActor, actors, AsyncStreamreferences/performance.md- Optimization, Instruments profiling, memory management
Official: Swift | SwiftUI | SwiftData
Libraries: TCA | Snapshot Testing | SwiftLint
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationWarning, 73 of 100Marginal. 1 run. Evaluated 8 months ago.
Source
- SKILL.md in the repositoryCheckingskills/apple-swift/SKILL.md
Popularity
- Repository stars
- 13
- Repository forks
- 2
- 7-day trend score
- 13
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 May 2026, 6 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/maroffo/claude-forge/apple-swift)