Swift Expert

Builds SwiftUI views and state management, designs protocol-oriented architectures, handles async/await concurrency, implements actors for thread safety.

Development / Engineeringdevelopmentengineering
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptBuild a detail screen in SwiftUI that displays product information.
Beforegeneric AI agent
I can help you build that SwiftUI screen. You'd want to set up a State variable to hold the product data, then use some layout containers to arrange the information on the screen. SwiftUI has built-in components like VStack and HStack that make it pretty straightforward. You might also want to think about how the data flows from your model to the view. There are a few different approaches to state management in SwiftUI depending on your needs. Would you like me to walk through a basic example first?
Afterwith Swift Expert
SWIFTUI DETAIL SCREEN

ARCHITECTURE: Protocol-Oriented with ObservedObject

protocol ProductDisplay {
  var id: String { get }
  var title: String { get }
  var price: Decimal { get }
  var images: [URL] { get }
}

class ProductViewModel: ObservableObject {
  @Published var product: ProductDisplay?
  @Published var isLoading = false
  @Published var error: Error?
  
  func load(productId: String) async {
    isLoading = true
    do {
      product = try await fetchProduct(productId)
    } catch {
      self.error = error
    }
    isLoading = false
  }
}

struct ProductDetailView: View {
  @StateObject var viewModel = ProductViewModel()
  
  var body: some View {
    if let product = viewModel.product {
      VStack(spacing: 16) {
        AsyncImage(url: product.images.first)
        Text(product.title).font(.headline)
        Text("$" + String(product.price)).font(.title2)
      }
    } else if viewModel.isLoading {
      ProgressView()
    } else if let error = viewModel.error {
      ErrorView(error: error)
    }
  }
}

STATE MANAGEMENT

Data binding: ViewState drives UI refresh
Async/await: Load product on appear
Error handling: Shows error overlay
Actor isolation: Thread-safe data fetching

About this skill


name: swift-expert description: Use when Builds iOS/macOS/watchOS/tvOS applications, implements SwiftUI views and state management, designs protocol-oriented architectures, handles async/await concurrency, implements actors for thread saf...

Swift Expert

Builds iOS/macOS/watchOS/tvOS applications, implements SwiftUI views and state management, designs protocol-oriented architectures, handles async/await concurrency, implements actors for thread safety, and debugs Swift-specific issues. Use when building iOS/macOS applications with Swift 5.9+, SwiftUI, or async/await concurrency. Invoke for protocol-oriented programming, SwiftUI state management, actors, server-side Swift, UIKit integration, Combine, or Vapor.

What you get

  • Public GitHub repo
  • the skills/swift-expert folder with SKILL.md and references.

Customize your output

  • Fork the repo and extend the skill's reference files for your own stack conventions.

Example output

Activates on a matching request (e.g. building or reviewing Swift Expert code) and can chain with other skills in the pack.

Best for

Full-stack developers and engineering teams using Claude Code.

SKILL.md preview

SKILL.md
---
name: swift-expert
description: Use when building iOS, macOS, watchOS, or tvOS applications with Swift 5.9+, SwiftUI, async/await concurrency, or actors.
version: 1.0.0
category: Development / Engineering
author: AgentVolt
license: proprietary
tags:
  - development
  - engineering
---

# Swift Expert

Builds SwiftUI views and state management, designs protocol-oriented architectures, handles async/await concurrency, implements actors for thread safety, and debugs Swift-specific issues.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →