Skip to content
Agentmart
Submit a tool

apple-swift

Apple platform development with Swift, SwiftUI, async/await, and performance.

Skill by maroffo

IndexedMIT★ 17
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/maroffo-apple-swift

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/apple-swift

What's inside

Skill name
apple-swift
Description
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.
License
MIT
Compatibility
Requires Xcode and platform SDKs. Optional: SwiftLint.
Instructions
144 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Agent Skills spec issues

  • allowed-tools: must be a space-separated string

Files (5)

  • SKILL.md
  • concurrency-patterns.md · references/
  • performance.md · references/
  • swift6-patterns.md · references/
  • swiftui-patterns.md · references/

SKILL.md (first lines)

# ABOUTME: Apple platform guide, Swift, SwiftUI, concurrency, testing, performance
# ABOUTME: Conventions, strict concurrency rules, MVVM + DI patterns, review checklists

# Apple Platform Development

## Quick Reference

```bash
# Build
xcodebuild -scheme MyApp -sdk iphoneos build
xcodebuild -scheme MyApp -sdk macosx build

# Tests (pick <booted device> from: xcrun simctl list devices | grep Booted)
xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=<booted device>'

# SwiftLint / SPM
swiftlint lint [--fix]
swift build && swift test && swift package resolve

# ast-grep
sg --pattern '@Observable final class $NAME { $$$ }' --lang swift
sg --pattern '@MainActor' --lang swift
```

**See also:** `_AST_GREP.md`, `_PATTERNS.md`, `source-control`, `references/`

---

## Version (determine, don't assume)

See `../_LANG_COMMON.md`. Fetch the truth:

```bash
swift --version                                 # local toolchain
xcodebuild -version                             # Xcode version
cat .swift-version 2>/dev/null                  # pinned toolchain (if present)
grep -E 'swift-tools-version' Package.swift     # SPM minimum
curl -s https://api.github.com/repos/swiftlang/swift/releases/latest | jq -r .tag_name  # latest upstream
```

---

## 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:

```bash
swift build                                     # compilation check
swift test                                      # unit tests
swiftlint lint --strict                         # lint (fail on warnings)
swift-format lint --recursive Sources Tests     # formatting check
xcodebuild -scheme MyApp test \
  -destination 'platform=iOS Simulator,name=<booted device>'   # platform tests
```

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`.

---

From maroffo/claude-forge, MIT.

More from maroffo/claude-forge

Signals

Stars
17
Forks
1
Open issues
6
Last commit (this folder)
Sep 23, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from maroffo

Cite this page

apple-swift skill. Agent Mart. https://agentmart.dev/skills/maroffo-apple-swift (last updated 2026-10-24)