swift-expert

swift-expert is a skill for Claude Code from personamanagmentlayer/pcl. It costs 76 tokens per session (2,383 once invoked), scanned A, original, Apache-2.0.

A guide to modern Swift development for iPhone, iPad, and Mac apps, including SwiftUI, Combine, and asynchronous code. Swift is Apple's programming language for its platforms.

In plain words
What is it for?
Use it when building or reviewing Swift applications, user interfaces, background tasks, or reactive data flows with SwiftUI and Combine.
Why use it?
It helps developers choose correct Swift patterns and understand newer language features without having to piece the rules together themselves.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when building or reviewing Swift applications, user interfaces, background tasks, or reactive data flows with SwiftUI and Combine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/personamanagmentlayer/pcl/swift-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add personamanagmentlayer/pcl --skill swift-expert
Clone the repo
git clone --depth 1 https://github.com/personamanagmentlayer/pcl

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swift-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/swift-expert/github.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/swift-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/swift-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/swift-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swift-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/swift-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/swift-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,383 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.02383
Opus 5 $0.00038 $0.01192
Sonnet 5 $0.00015 $0.00477
Haiku 4.5 $0.00008 $0.00238

Measured 5d ago against content hash b24d58593a2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

swift-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

stdlib/languages/swift-expert/SKILL.md · 439 lines

How it starts

The opening of the file, as written. The whole thing — 439 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Swift Expert

Expert guidance for Swift development including iOS/macOS apps, SwiftUI, Combine, async/await, and Swift 5.9+ features.

Core Concepts

Modern Swift Features (5.9+)

  • Async/await concurrency
  • Actors for thread safety
  • Property wrappers
  • Result builders
  • Protocols and generics
  • Value types vs reference types
  • Automatic Reference Counting (ARC)
  • Macros (Swift 5.9+)

SwiftUI

  • Declarative UI framework
  • State management
  • View composition
  • Layout system
  • Animations
  • Navigation

Combine

  • Reactive programming
  • Publishers and subscribers
  • Operators
  • Error handling

SwiftUI

Basic Views

import SwiftUI

struct ContentView: View {
    @State private var name = ""
    @State private var count = 0

    var body: some View {
        VStack(spacing: 20) {
            Text("Hello, \(name.isEmpty ? "World" : name)!")
                .font(.title)
                .foregroundColor(.blue)

            TextField("Enter name", text: $name)
                .textFieldStyle(.roundedBorder)
                .padding()

            HStack {
                Button("Decrement") {
                    count -= 1
                }

                Text("\(count)")
                    .frame(minWidth: 50)

                Button("Increment") {
                    count += 1
                }
            }
            .buttonStyle(.borderedProminent)
        }
        .padding()
    }
}

State Management

// @State - local view state
struct CounterView: View {
    @State private var count = 0

    var body: some View {
        Button("Count: \(count)") {
            count += 1
        }
    }
}

// @Binding - pass state reference
struct ChildView: View {
    @Binding var isOn: Bool

    var body: some View {
        Toggle("Setting", isOn: $isOn)
    }
}

// @ObservableObject - external state
class UserViewModel: ObservableObject {
    @Published var user: User?
    @Published var isLoading = false
    @Published var error: Error?

    func fetchUser() async {
        isLoading = true
        defer { isLoading = false }

        do {
            user = try await APIClient.shared.fetchUser()
        } catch {
            self.error = error
        }
    }
}

struct UserView: View {
    @StateObject private var viewModel = UserViewModel()

    var body: some View {
        Group {
            if viewModel.isLoading {
                ProgressView()
            } else if let user = viewModel.user {
                UserDetailView(user: user)
            } else if let error = viewModel.error {
                ErrorView(error: error)
            }
        }
        .task {
            await viewModel.fetchUser()
        }
    }
}

// @EnvironmentObject - app-wide state
@main
struct MyApp: App {
    @StateObject private var appState = AppState()

    var body: some Scene {
        WindowGroup {
            ContentView()
                .environmentObject(appState)
        }
    }
}

struct SomeView: View {
    @EnvironmentObject var appState: AppState

    var body: some View {
        Text(appState.currentUser?.name ?? "Guest")
    }
}

Read the full file on GitHub · 439 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · -185 lines · +48 tokens per session b24d58593a2f
  2. 6d ago First seen · 624 lines · 28 tokens per session scan A 05af69294c74

Subscribe to this mod's changes

swift-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (40 stars, last pushed 3d ago), licensed Apache-2.0. It adds 76 tokens to every session and 2,383 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

moai-lang-swift

Swift 6.0 enterprise development with async/await, SwiftUI, Combine, and Swift Concurrency. Advanced patterns for iOS, macOS, server-side Swift, and enterprise mobile applications with Context7 MCP integration.

mosif16/codex-Skills · 51 tokens

swiftui-whats-new-27

New SwiftUI APIs, behaviors, and deprecations introduced in the 2027 OS releases (iOS 27, macOS 27, watchOS 27, tvOS 27, visionOS 27). Use when a SwiftUI view using @State fails to compile with "used before being initialized", "invalid redeclaration of synthesized property", or "extraneous argument label" errors after…

superagents-lab/xcode27-skills · 566 tokens

swift

Swift programming patterns for iOS and macOS.

miles990/claude-software-skills · 11 tokens

swift-architecture-skill

Swift iOS architecture guidance and playbooks for MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns. Use when designing, implementing, refactoring, or reviewing the architecture of a SwiftUI or UIKit feature, module, or codebase.

efremidze/swift-architecture-skill · 65 tokens

antigravity-root

Enterprise-grade iOS development workflow for TTBaseUIKit-powered apps. Cross-functional product analysis | MVVM-C Architecture | UIKit + SwiftUI | TTViewCodable | TTBaseSUI | xcodebuild CLI Verification | Zero Regression | iOS 14+.

tqtuan1201/TTBaseUIKit · 57 tokens

Swift Patterns

Use this skill when working on Swift projects (SwiftPM packages, iOS/macOS apps) and you want consistent patterns for concurrency, structure, and safety.

AmariahAK/atlarix-skills · 2 tokens