SwiftUI

SwiftUI is a skill for Claude Code from onmyway133/claude-code-plugins. It costs 16 tokens per session (4,321 once invoked), scanned A, original, MIT.

A guide to SwiftUI, Apple’s framework for building app interfaces with Swift. It covers how to structure views, style them, and create reusable UI components.

In plain words
What is it for?
Use it when building SwiftUI screens and components, including buttons, sections, navigation links, cards, and other reusable views.
Why use it?
It helps keep SwiftUI code organised as views grow, making components easier to configure, reuse, and preview.

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 when building SwiftUI screens and components, including buttons, sections, navigation links, cards, and other reusable views.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/onmyway133/claude-code-plugins/swiftui
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 swiftui
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 SwiftUI

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/onmyway133/claude-code-plugins/swiftui"><img src="https://agentmods.dev/badge/skills/onmyway133/claude-code-plugins/swiftui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,321 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.00016 $0.04321
Opus 5.5 $0.00006 $0.01728
Sonnet 5.5 $0.00003 $0.00864
Haiku 4.5 $0.00002 $0.00432

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

Security

Grade A, and why

SwiftUI 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/swiftui/SKILL.md · 822 lines

How it starts

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

SwiftUI

You are a SwiftUI expert. Apply these patterns when building views and components.

Component Design Principles

Single Responsibility

Each component should do one thing well. Split complex views into smaller, focused components.

Configurable via Initializer

Expose configuration through init parameters, not environment or external state.

Preview-Friendly

Components should be easily previewable in isolation with sensible defaults.

Trailing Closure Style

Always prefer trailing closure syntax for better readability and consistency:

// Preferred: trailing closures
Button {
    saveDocument()
} label: {
    Label("Save", systemImage: "square.and.arrow.down")
}

Section {
    TextField("Name", text: $name)
    TextField("Email", text: $email)
} header: {
    Text("Contact Info")
} footer: {
    Text("We'll never share your email")
}

NavigationLink {
    DetailView(item: item)
} label: {
    ItemRow(item: item)
}

// Avoid: inline style
Button("Save") { saveDocument() }
Section("Header") { content }
NavigationLink("Details", destination: DetailView())

View Composition

Container Components

struct Card<Content: View>: View {
    let content: Content

    init(@ViewBuilder content: () -> Content) {
        self.content = content()
    }

    var body: some View {
        content
            .padding()
            .background(.background.secondary)
            .clipShape(RoundedRectangle(cornerRadius: 12))
            .shadow(color: .black.opacity(0.1), radius: 4, y: 2)
    }
}

// Usage
Card {
    VStack {
        Text("Title")
        Text("Subtitle")
    }
}

Slot-Based Components

struct ListRow<Leading: View, Trailing: View>: View {
    let title: String
    let leading: Leading
    let trailing: Trailing

    init(
        title: String,
        @ViewBuilder leading: () -> Leading = { EmptyView() },
        @ViewBuilder trailing: () -> Trailing = { EmptyView() }
    ) {
        self.title = title
        self.leading = leading()
        self.trailing = trailing()
    }

    var body: some View {
        HStack {
            leading
            Text(title)
            Spacer()
            trailing
        }
    }
}

// Usage
ListRow(title: "Settings") {
    Image(systemName: "gear")
} trailing: {
    Image(systemName: "chevron.right")
}

Read the full file on GitHub · 822 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 · 822 lines · 16 tokens per session scan A 6e9b88655659

Subscribe to this mod's changes

SwiftUI is a skill published in the GitHub repository onmyway133/claude-code-plugins (5 stars, last pushed 9mo ago), licensed MIT. It adds 16 tokens to every session and 4,321 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

omh-apple-design

This is an OMH apple-design workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 83 tokens

apple-hig

Apple Human Interface Guidelines reference, updated for iPhone Duo and OS 27. Provides authoritative platform-specific design rules, component specifications, exact measurements, and interaction patterns for iOS, iPadOS, macOS, tvOS, visionOS, and watchOS. Use when designing, reviewing, auditing, or fixing any Apple…

justinwetch/HIGAgentSkills · 158 tokens

flutter-design-system

Enforce Design Language System adherence in Flutter. Use when implementing design tokens, preventing hardcoded colors/spacing, or building a DLS.

HoangNguyen0403/agent-skills-standard · 32 tokens

mobile-design

Design and implement mobile interfaces for touch, keyboards, safe areas and native navigation. Use when creating phone/tablet/foldable screens or adapting web ideas to mobile; platform behavior and device evidence matter alongside visual tokens.

WrongStack/WrongStack · 46 tokens

frontend-design-deslop

Designs distinctive, non-generic UI — typography, OKLCH color, design tokens (DESIGN.md), layout, components, motion, dark mode, accessibility — for landing pages, SaaS apps, dashboards, ecommerce, decks, docs, portfolios, avoiding the AI-slop / Claude-esque default look. Use whenever building or styling any web…

samber/cc-skills · 172 tokens

spec-image

A structured image-generation and image-editing workflow that turns a visual request into a specification for the scene, subject, details, and constraints.

renky1025/agent-skills · 286 tokens