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.
npx skills add shahtuyakov/claude-setup --skill swift-patternsgit clone --depth 1 https://github.com/shahtuyakov/claude-setupWrote 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.
[](https://agentmods.dev/skills/shahtuyakov/claude-setup/swift-patterns)<a href="https://agentmods.dev/skills/shahtuyakov/claude-setup/swift-patterns"><img src="https://agentmods.dev/badge/skills/shahtuyakov/claude-setup/swift-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.01069 |
| Opus 5 | $0.00032 | $0.00535 |
| Sonnet 5 | $0.00013 | $0.00214 |
| Haiku 4.5 | $0.00006 | $0.00107 |
Grade A, and why
swift-patterns 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Patterns
Modern Swift and SwiftUI patterns for iOS development.
iOS Version Selection
| Target | Best For | Stack |
|---|---|---|
| iOS 26+ | New apps, latest features | SwiftUI + SwiftData + @Observable + Foundation Models |
| iOS 17+ | Broad compatibility with modern APIs | SwiftUI + SwiftData + @Observable |
| iOS 15+ | Maximum device coverage | SwiftUI + Core Data + ObservableObject |
Reference Files
| Topic | Load | Use When |
|---|---|---|
| Project structure | references/project-structure.md |
Setting up or organizing code |
| SwiftUI views | references/swiftui-patterns.md |
Building UI components |
| State management | references/state-management.md |
@Observable, ObservableObject, @State |
| Data persistence | references/data-persistence.md |
SwiftData, Core Data, Keychain |
| Networking | references/networking.md |
URLSession, API clients |
| Concurrency | references/concurrency.md |
async/await, actors, tasks |
| Navigation | references/navigation.md |
NavigationStack, coordinators |
| iOS 26 features | references/ios26-features.md |
Liquid Glass, Foundation Models |
Quick Start Patterns
Basic SwiftUI View (iOS 17+)
import SwiftUI
struct UserProfileView: View {
@State private var viewModel = UserProfileViewModel()
var body: some View {
Group {
if viewModel.isLoading {
ProgressView()
} else if let user = viewModel.user {
VStack {
Text(user.name)
.font(.title)
Text(user.email)
.foregroundStyle(.secondary)
}
} else if let error = viewModel.error {
ContentUnavailableView(
"Error",
systemImage: "exclamationmark.triangle",
description: Text(error.localizedDescription)
)
}
}
.task {
await viewModel.loadUser()
}
}
}
What ships with it
8 files 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.
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.
- 6d ago First seen · 161 lines · 63 tokens per session scan A c9e2628c88d9
swift-patterns is a skill published in the GitHub repository shahtuyakov/claude-setup (13 stars, last pushed 8mo ago), licensed MIT. It adds 63 tokens to every session and 1,069 once invoked, about $0.0003 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-08-30.
Other skills, from other repositories
jetpack-compose-expert
Use when working in a native Android Jetpack Compose project - build.gradle.kts with androidx.compose BOM or org.jetbrains.kotlin.plugin.compose, .kt files containing @Composable functions, MainActivity with setContent, or mentions of Compose, Material 3, recomposition, ViewModel, StateFlow, Hilt, Room, or Navigation…
swiftui-expert
Use when working in a native iOS/SwiftUI project - .swift files, an .xcodeproj or Package.swift, Xcode schemes, or mentions of SwiftUI, Swift 6, @Observable, SwiftData, NavigationStack, actors, or Swift Testing. Builds views and features, wires Observation-based state, fixes Swift 6 strict-concurrency errors, models…
build-android-binary
Compile a PAM control's Android Kotlin module into the runtime-loadable DEX for a .ppmplugin. Creates a staged Gradle build with the pinned wrapper and react-android compile dependency, verifies manifest/module/package alignment and runtime-loading constraints, builds the release AAR, then runs d8 --min-api 24. Writes…
kotlin-patterns
Kotlin: coroutines, Flow, sealed/data classes, null safety, Ktor, Compose, KMP. Triggers: Kotlin, coroutine, Flow, suspend, Ktor, Jetpack Compose, KMP, kotlinx.
swift-patterns
Swift/iOS: SwiftUI, Combine, async/await, actors, SPM, Core Data, UIKit interop. Triggers: Swift, SwiftUI, Combine, iOS, Xcode, actor, Core Data, @MainActor, @State.
generators
Code generator skills that produce production-ready Swift code for common app components. Use when user wants to add logging, analytics, onboarding, review prompts, networking, authentication, paywalls, settings, persistence, error monitoring, CI/CD pipelines, localization, push notifications, deep linking, testing…