Swift

Swift is a skill for Claude Code from onmyway133/claude-code-plugins. It costs 13 tokens per session (2,456 once invoked), scanned A, original, MIT.

Guidance for building Swift applications for Apple platforms, especially iPhone and iPad apps, with Swift 6 and SwiftUI. It covers modern concurrency, shared state, code organisation, and Apple interface guidelines.

In plain words
What is it for?
Use it to structure SwiftUI views, shared observable data, asynchronous code, and app interfaces that follow Apple’s design guidance.
Why use it?
It gives an agent consistent choices for current Swift and SwiftUI code and avoids adding third-party frameworks unless requested.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the super plugin — 6 skills, 5 commands, 6 agents, 4 MCP servers shipped together

Good fit Use it to structure SwiftUI views, shared observable data, asynchronous code, and app interfaces that follow Apple’s design guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/onmyway133/claude-code-plugins/swift
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 onmyway133/claude-code-plugins --skill swift
Clone the repo
git clone --depth 1 https://github.com/onmyway133/claude-code-plugins

Made for: Claude Code.

Or install super, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 6 agents, 4 MCP servers.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/onmyway133/claude-code-plugins/swift/github.svg)](https://agentmods.dev/skills/onmyway133/claude-code-plugins/swift)
Your own site
<a href="https://agentmods.dev/skills/onmyway133/claude-code-plugins/swift"><img src="https://agentmods.dev/badge/skills/onmyway133/claude-code-plugins/swift/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/onmyway133/claude-code-plugins/swift"><img src="https://agentmods.dev/badge/skills/onmyway133/claude-code-plugins/swift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,456 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.
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.00013 $0.02456
Opus 5.5 $0.00005 $0.00982
Sonnet 5.5 $0.00003 $0.00491
Haiku 4.5 $0.00001 $0.00246

Measured 1mo ago against content hash 484699f461f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Swift 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 1mo 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.

plugins/super/skills/swift/SKILL.md · 456 lines

How it starts

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

Swift

You are a Swift and iOS development expert. Apply these guidelines when working on Swift code.

Target Requirements

  • Swift 6+ with modern Swift concurrency
  • SwiftUI with @Observable for shared data
  • No third-party frameworks without explicit approval
  • Avoid UIKit unless explicitly requested
  • Follow Apple Human Interface Guidelines

Code Organization

Extension-Based Grouping

Organize related functionality using extensions:

// MARK: - Main View
struct BooksView: View {
    @State private var books: [Book] = []

    var body: some View {
        List(books) { book in
            BookCell(book: book)
        }
    }
}

// MARK: - Subviews
extension BooksView {
    struct BookCell: View {
        let book: Book

        var body: some View {
            HStack {
                BookCover(url: book.coverURL)
                BookInfo(book: book)
            }
        }
    }

    struct BookCover: View {
        let url: URL?
        var body: some View { /* ... */ }
    }

    struct BookInfo: View {
        let book: Book
        var body: some View { /* ... */ }
    }
}

// MARK: - View Model
extension BooksView {
    @Observable
    @MainActor
    final class ViewModel {
        var books: [Book] = []
        var isLoading = false

        func loadBooks() async { /* ... */ }
    }
}

File Structure

  • Place each struct/class/enum in separate Swift files
  • Don't break views into computed properties; use separate View structs
  • Organize by feature, not layer
Features/
├── Books/
│   ├── BooksView.swift
│   ├── BookDetailView.swift
│   └── Models/
├── Settings/
│   └── SettingsView.swift
└── Shared/
    ├── Components/
    └── Extensions/

Naming Conventions

// Types: UpperCamelCase
struct UserProfile { }
enum NetworkError { }
protocol DataFetching { }

// Properties and methods: lowerCamelCase
var currentUser: User
func fetchUserData() async throws -> User

// Boolean properties: use assertion form
var isEnabled: Bool
var hasUnreadMessages: Bool
var canSubmit: Bool

// Collections: use plural nouns
var users: [User]
var selectedItems: Set<Item>

// Mutating vs non-mutating
func add(_ item: Item)           // mutates
func adding(_ item: Item) -> [Item]  // returns new

Read the full file on GitHub · 456 lines

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. 1mo ago First seen · 456 lines · 13 tokens per session scan A 484699f461f5

Subscribe to this mod's changes

Swift is a skill published in the GitHub repository onmyway133/claude-code-plugins (5 stars, last pushed 9mo ago), licensed MIT. It adds 13 tokens to every session and 2,456 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

Other skills, from other repositories

ios_developer

Comprehensive iOS development guidance covering SwiftUI, Swift Concurrency, Core Data, and Swift Testing.

onmyway133/skills · 24 tokens

kotlin-android

Build and upgrade native Android applications with Kotlin, Compose/View UI and lifecycle-aware work. Use when implementing Android screens, navigation, permissions or background jobs; coordinate Kotlin, Gradle, AGP and SDK compatibility.

WrongStack/WrongStack · 47 tokens

swift-ios

Build and upgrade native iOS applications with Swift, SwiftUI/UIKit and correct lifecycle/concurrency ownership. Use when implementing native screens, platform integrations or Swift migrations; verify toolchain, deployment target and device behavior separately.

WrongStack/WrongStack · 46 tokens

stream-swift

Build, integrate, migrate to, and answer how-to questions for Stream Chat, Video, and Feeds in Swift / SwiftUI / UIKit / iOS apps - including AI assistants and agentic experiences (ChatGPT-style apps, LLM bots in chat, streaming responses, thinking indicators, reasoning and tool-call steps, tool approvals, device-side…

GetStream/agent-skills · 141 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

dagger-hilt-expert

Expert guidance for Dagger and Hilt dependency injection in Android. Use when implementing DI, creating modules, configuring scopes, optimizing performance, testing with Hilt, setting up multi-module architecture, using assisted injection, or debugging DI issues. Triggers on "dagger", "hilt", "dependency injection"…

JosephSanjaya/skills · 145 tokens