Skip to main content
subagent CX Codex

swift-expert · 0xfurai — Claude Code subagent for Swift: what it does, install

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.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/swift-expert.md
Open on GitHub

What swift-expert does

It handles the everyday Swift layer: Optionals and generics, protocol-oriented design, SwiftUI views, concurrency through async/await and actors, ARC memory questions, error paths built on Result and throws. What comes back is code, view code, XCTest cases, benchmark notes, review comments and refactors.

The whole agent is one markdown file split into focus areas, approach, a quality checklist and an output list. The checklist names minimal force unwrapping, test coverage and SwiftLint. The approach prefers protocol extensions for shared defaults and reaches for switch when branching gets long.

One habit is worth knowing before you hand it a slow screen: it profiles first and optimizes after. Ask why something stutters and you get a request for measurements instead of a rewrite. Force unwraps get flagged too, since they sit on the quality list.

What it helps with

  • strip force unwraps and unwrap Optionals safely
  • move networking onto async/await and actors
  • pull shared behaviour into protocol extensions
  • add XCTest coverage for a model type
  • profile a slow screen before touching the code

Example prompts for the agent

  • Refactor FeedViewModel.swift to drop force unwraps and load data with async/await.
  • Review ProfileView against SwiftUI patterns and list the changes you would make.
  • Write XCTest cases for OrderCalculator and profile it before optimizing.

How to install swift-expert

Manually: put the files in place

.claude/agents/swift-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

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 Claude Code?

Copy the subagent file from the 0xfurai/claude-code-subagents repository into your project at .claude/agents/swift-expert.md.

What does swift-expert do?

It writes and reviews idiomatic Swift: Optionals and generics, protocol-oriented code, SwiftUI, async/await and actors, ARC memory, error handling. Output includes code, views, XCTest cases and review feedback.

What does it look at during a review?

Force unwrapping kept to a minimum, generics for type safety, test coverage, memory use and clear error paths. Style gets checked against SwiftLint, and the API design guidelines are part of the checklist too.

Source text

swift-expert.md · MIT
---
name: swift-expert
description: Write efficient, idiomatic Swift code with a focus on safety, performance, and modern features. Handles Swift UI, concurrency, and protocol-oriented programming. Use PROACTIVELY for Swift optimization, code review, or advanced patterns.
model: claude-sonnet-4-20250514
---

## Focus Areas
- Advanced Swift features (Optionals, Generics, Protocols)
- Protocol-Oriented Programming
- SwiftUI design patterns
- Concurrency with async/await and Actors
- Memory management with ARC
- Error handling with Result type and throws
- Performance optimization and profiling
- Writing idiomatic Swift code
- Test-driven development with XCTest
- Code readability and maintenance

## Approach
- Prioritize safety and clarity in code
- Leverage Swift's strong type system
- Use extensions to add functionality
- Employ Swift's powerful switch statements
- Optimize code with Swift's performance guidelines
- Write unit tests to ensure code reliability
- Use protocol extensions to provide default implementations
- Embrace Swift's functional programming capabilities
- Profile before optimizing for performance
- Keep up with the latest Swift language updates

## Quality Checklist
- Code is concise and idiomatic
- Proper use of Optionals and unwrapping
- Minimal use of force unwrapping
- Effective use of generics for type safety
- Comprehensive unit test coverage
- Optimized memory usage
- Clear error handling paths
- Adherence to Swift's API design guidelines
- Well-organized code structure
- Consistent use of SwiftLint for linting

## Output
- Swift code that is safe and efficient
- SwiftUI views following best practices
- Concurrency-safe implementations
- Comprehensive tests using XCTest
- Performance benchmarking and analysis
- Code reviews with actionable feedback
- Refactored Swift code for readability
- Documentation with clear comments
- Completed tasks efficiently and effectively
- Adherence to best practices in Swift programming

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Programming languages →

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 VoltAgent 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. CX Codex ★ 6,505repo stars swift Mindrally Guides your agent to write clean Swift and SwiftUI code for iOS, macOS, watchOS, and tvOS using the MVVM pattern. CX Codex +1 748installs swift-optimise pproenca The swift-optimise skill reviews Swift and SwiftUI performance across concurrency, rendering, and animation. Use it while profiling clinic modules. CX Codex +1 293installs swift-code-reviewer John Rogers (@johnrogers) swift-code-reviewer inspects Swift and iOS implementations for concurrency safety, HIG rules, TCA patterns, and security before testing. CX Codex ★ 233repo stars guide-swift-testing Prisma-Labs-Dev guide-swift-testing provides patterns and review rules for Swift Testing. Helps write and audit test suites targeting Swift 6.2 concurrency. CX Codex +1 534installs swift-testing-expert AvdLee swift-testing-expert coaches your agent through Swift Testing: #expect and #require macros, tags, parameterized tests, and moving a suite off XCTest. CX Codex +1 5,700installs swift-concurrency dpearson2699 swift-concurrency fixes Sendable errors and actor isolation diagnostics in Swift 6.2+ while adopting approachable concurrency features. CX Codex +1 4,600installs

From the same set137

The whole set →
jenkins-expert jenkins-expert is a Claude Code subagent for building Jenkinsfiles and CI/CD pipelines, configuring jobs, plugins, and access. It supports build and deployment automation. CX Codex ★ 1,029repo stars pytorch-expert pytorch-expert — a Claude subagent for PyTorch work: building networks, writing custom losses, chasing gradient bugs and training on GPU. CX Codex ★ 1,029repo stars jest-expert jest-expert — a Claude Code subagent that configures Jest, creates isolated JavaScript tests, handles mocks, and sets up coverage reporting. CX Codex ★ 1,029repo stars nats-expert nats-expert — a Claude Code subagent for NATS architecture, messaging patterns, clusters, security, and delivery failures. Use it when a project depends on NATS. CX Codex ★ 1,029repo stars redis-expert redis-expert configures Redis caching, sets up RDB and AOF persistence, designs clusters, and writes Lua scripts. Useful for tuning in-memory storage under heavy loads. CX Codex ★ 1,029repo stars braintree-expert The braintree-expert subagent helps with Braintree integrations, payment flows, and recurring billing. Ask it to work through API setup, webhooks, or transaction handling. CX Codex ★ 1,029repo stars vector-db-expert vector-db-expert handles vector database work: indexing, similarity search, embeddings, dimension reduction. Useful when vector queries get slow or the dataset outgrows the setup. CX Codex ★ 1,029repo stars pandas-expert pandas-expert — a subagent for data manipulation and analysis with Python pandas, focusing on vectorized operations and memory-efficient data types. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open