Swift

Swift is a skill for Claude Code, Codex 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/onmyway133/claude-code-plugins/swift
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00013 $0.02456
Opus 5 $0.00006 $0.01228
Sonnet 5 $0.00003 $0.00491
Haiku 4.5 $0.00001 $0.00246

Measured 4d ago against content hash 484699f461f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 7mo ago), licensed MIT. It adds 13 tokens to every session and 2,456 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

imagegen-frontend-mobile

Elite mobile app image-generation skill for creating premium, app-native screen concepts and flows. Designed for iOS, Android, and cross-platform mobile products. Prioritizes clean hierarchy, comfortably readable text, strong multi-screen consistency, controlled color palettes, non-generic creative direction, textured…

Leonxlnx/taste-skill · 126 tokens

app-implement-feature

Guide for implementing features in baguette — a Swift CLI + WebSocket server that drives iOS simulators via private SimulatorKit. Use this skill when: (1) Adding a new gesture, button, keyboard surface, stream format, or device-chrome behaviour (anything that lands across Domain / Infrastructure / App +…

tddworks/baguette · 192 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

kotlin

Design, implement, and review Kotlin and Android APIs. Use when working on .kt files, Kotlin nullability, sealed classes/interfaces, coroutines, Android threading, Java interop, or Kotlin-backed React Native Nitro Module implementations.

margelo/react-native-skills · 49 tokens

swift

Design, implement, and review Swift APIs and Apple-platform code. Use when working on .swift files, Swift types, Foundation or AVFoundation APIs, DispatchQueue, async/await, Task, actors, MainActor, thread-affine state, or Swift-backed React Native Nitro Module implementations.

margelo/react-native-skills · 60 tokens