Skip to main content
subagent CX Codex

swift-expert · voltagent/awesome-codex-subagents — Codex subagent for iOS and macOS

swift-expert — a subagent for Swift work on iOS and macOS. Treats production code as a contract, not a checklist: maps execution boundaries, identifies root causes, applies minimal changes, and validates impact on the rest of the codebase.

MIT ★ 6,505 updated 2026-10-05

Install into Codex · Manually: put the files in place All methods and platforms ↓
.codex/agents/swift-expert.toml
Open on GitHub

What swift-expert does

swift-expert handles async/await, Apple platform APIs, strongly typed logic, and long-lived objects. It begins by mapping the exact execution boundary—entry point, data path, and external dependencies—then locates the design gap or root cause before recommending a single coherent change that leaves surrounding code untouched.

It verifies value/reference semantics, actor isolation, UIKit and SwiftUI state sync, error propagation, and SDK version compatibility. For each change, it tests three paths: success, failure, and cancellation; checks for data races and decoding crashes; and confirms UI updates run on the correct execution context.

Returns the module and boundary analyzed; the concrete issue and its cause; the minimal fix with tradeoff reasoning; what was tested locally and what still needs environment-level validation; residual risk and follow-up actions.

What it helps with

  • fix data races between actor boundaries in async operations
  • sync UI state across UIKit and SwiftUI transitions
  • resolve Apple SDK version constraints and implement fallbacks
  • trace memory leaks and observer lifecycle in long-lived objects
  • validate error handling and recovery paths through application flows

Example prompts for the agent

  • Why isn't this async task cancelled when the view model deinitializes, and what could crash?
  • I have a UIViewController with a Combine publisher updating a SwiftUI view—find the data race and suggest moving to an actor.
  • Analyze the boundary between our REST API client and CoreData: which optionals and version assumptions could cause decoding crashes.

How to install swift-expert

Manually: put the files in place

.codex/agents/swift-expert.toml

Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about swift-expert

How do I install swift-expert in Codex?

Add the config file .codex/agents/swift-expert.toml to your project root. The exact structure depends on your Codex version; check the platform docs for custom subagent setup.

When should I use swift-expert instead of a general assistant?

When you need to work through async/await, actor isolation, memory lifecycle, SDK compatibility, or UIKit-SwiftUI state sync—tasks that require analyzing execution boundaries and concrete risks, not templated code.

What happens if I ask swift-expert to review code I copied from Stack Overflow?

It won't just paste it in. It maps where the code gets its data and what it depends on, surfaces risks for your architecture (memory leaks, data races, missing error handling), and recommends the smallest change that fits your existing style.

Source text

swift-expert.toml · MIT
# swift-expert

Use when a task needs Swift expertise for iOS or macOS code, async flows, Apple platform APIs, or strongly typed application logic.

Own Swift tasks as production behavior and contract work, not checklist execution.

Prioritize smallest safe changes that preserve established architecture, and make explicit where compatibility or environment assumptions still need verification.

Working mode:
1. Map the exact execution boundary (entry point, state/data path, and external dependencies).
2. Identify root cause or design gap in that boundary before proposing changes.
3. Implement or recommend the smallest coherent fix that preserves existing behavior outside scope.
4. Validate the changed path, one failure mode, and one integration boundary.

Focus on:
- value/reference semantics and data ownership clarity
- async/await and actor isolation correctness
- UI state synchronization for UIKit/SwiftUI boundaries
- error propagation and recoverability in app flows
- API/SDK integration boundaries and version compatibility
- memory and lifecycle behavior in long-lived objects
- keeping code idiomatic to existing app architecture

Quality checks:
- verify changed behavior under success, failure, and cancellation states
- confirm actor/concurrency boundaries avoid data races
- check optionals and decoding assumptions for runtime crashes
- ensure UI updates occur on the correct execution context
- call out device/OS-version checks needed outside local workspace

Return:
- exact module/path and execution boundary you analyzed or changed
- concrete issue observed (or likely risk) and why it happens
- smallest safe fix/recommendation and tradeoff rationale
- what you validated directly and what still needs environment-level validation
- residual risk, compatibility notes, and targeted follow-up actions

Do not introduce broad architecture rewrites for localized defects unless explicitly requested by the parent agent.

© VoltAgent · MIT · VoltAgent/awesome-codex-subagents

Similar subagents

All subagents for Mobile →

swift-expert by other authors comes first.

swift-expert VoltAgent Community The swift-expert subagent helps build Swift apps for iOS, macOS, and server-side Swift. Use it for SwiftUI work, async/await, actor-based state, and memory safety checks. CX Codex 378installs swift-expert 0xfurai swift-expert — a Claude subagent for Swift work: SwiftUI views, async/await and actors, ARC memory, XCTest. Handy when you want a second pass over code or tests. CX Codex ★ 1,029repo stars guide-swift-concurrency Prisma-Labs-Dev guide-swift-concurrency guides AI agents through reviewing and writing concurrent Swift 6.2 code under strict concurrency checks. It flags actor reentrancy bugs, unsafe tasks, and GCD patterns. CX Codex +1 539installs swift-modernizer John Rogers (@johnrogers) The swift-modernizer subagent updates legacy Swift code toward async/await, modern APIs, and SwiftUI. Use it to plan and verify incremental migrations in an existing project. CX Codex ★ 233repo stars swift-concurrency wendylabsinc swift-concurrency guides your coding assistant through async/await, actor boundaries, and Swift 6 strict concurrency checks without careless @MainActor escapes. CX Codex +1 ★ 64repo stars swift margelo A skill for Swift work: type-safe API design, concurrency choices, Apple-platform integration. Fires when edits touch .swift files, async/await, DispatchQueue, or Nitro Modules. CX Codex +1 1,300installs swift-development rshankras swift-development reviews Swift concurrency, memory and code size: helps you migrate to Swift 6 strict mode and cut heap allocations. CX Codex +1 520installs axiom-concurrency CharlesWiltgen axiom-concurrency — a skill for concurrency work in Apple-platform apps: actors, @MainActor, Sendable, data races, async/await patterns. CX Codex +1 1,400installs

From the same set176

The whole set →
azure-infra-engineer The azure-infra-engineer subagent reviews and changes Azure infrastructure with security, reliability, and rollback in mind. Delegate work on resources, networking, identity, or automation. CX Codex ★ 6,505repo stars vue-expert vue-expert — a subagent for fixing Vue component issues, reactivity, and state problems. Maps execution boundaries and proposes minimal safe fixes that preserve project architecture. CX Codex ★ 6,505repo stars typescript-pro typescript-pro — a Codex subagent that fixes TypeScript compiler errors, interfaces, and types using minimal safe code edits. CX Codex ★ 6,505repo stars symfony-specialist symfony-specialist — a Codex subagent for Symfony work across routing, services, Doctrine, security, and application structure. Use it when a focused change must preserve existing behavior. CX Codex ★ 6,505repo stars sql-pro sql-pro designs SQL queries, reviews execution plans, debugs schema mismatches, and evaluates database migrations. CX Codex ★ 6,505repo stars spring-boot-engineer spring-boot-engineer — a subagent for Spring Boot tasks: configuration, data layers, APIs, transactions, and security. Maps execution boundaries, identifies root causes, and proposes minimal safe changes that preserve architecture. CX Codex ★ 6,505repo stars rust-engineer rust-engineer — a subagent for Rust work centered on ownership correctness, lifetimes, and async behavior. Targets systems code where borrowing errors or synchronization bugs have high cost. CX Codex ★ 6,505repo stars react-specialist react-specialist — a subagent for debugging React component behavior, state flow, and render bugs. It isolates root causes and applies targeted fixes. CX Codex ★ 6,505repo stars

Project sponsors

Companies that keep this analytics open