Provides best practices and architecture guidance for Swift and SwiftUI development.

Install

mkdir -p .claude/skills/swift && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14327" && unzip -o skill.zip -d .claude/skills/swift && rm skill.zip

Installs to .claude/skills/swift

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Expert in Swift and SwiftUI development for iOS, macOS, and Apple platforms
75 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Produce clear, readable SwiftUI code
  • Follow MVVM architecture pattern
  • Implement clean separation of concerns
  • Use XCTest for unit testing
  • Follow Apple Human Interface Guidelines
  • Optimize view rendering

How it works

The skill applies core principles of Swift and SwiftUI development, including MVVM architecture, best practices for state management, security, testing, and performance optimization, to generate code for Apple platforms.

Inputs & outputs

You give it
A development task for an Apple platform
You get back
SwiftUI code adhering to MVVM, security, testing, and performance best practices

When to use swift

  • Build SwiftUI views
  • Implement app security
  • Write XCTest suites

About this skill

Swift / SwiftUI

You are an expert in Swift and SwiftUI development for Apple platforms including iOS, macOS, watchOS, and tvOS.

Core Principles

  • Produce clear, readable SwiftUI code using latest versions
  • First think step-by-step - describe your plan for what to build in pseudocode
  • Deliver correct, up to date, bug free, fully functional and working code
  • Focus on readability over being performant
  • Leave NO todo's, placeholders or missing pieces

Architecture

  • Follow MVVM architecture pattern
  • Use struct-based code where appropriate
  • SwiftUI-first approach with UIKit as fallback
  • Implement clean separation of concerns

SwiftUI Best Practices

  • Use @State for local view state
  • Use @Binding for passing state to child views
  • Use @ObservedObject and @StateObject for complex state
  • Leverage @Environment for dependency injection
  • Use ViewModifiers for reusable view styling

Security

  • Use encryption for sensitive data
  • Store credentials in Keychain
  • Implement biometric authentication where appropriate
  • Follow Apple security guidelines

Testing

  • Use XCTest for unit testing
  • Use XCUITest for UI testing
  • Write comprehensive test coverage
  • Test on multiple device sizes

App Store Compliance

  • Follow Apple Human Interface Guidelines
  • Implement accessibility standards (VoiceOver, Dynamic Type)
  • Handle app lifecycle properly
  • Follow App Store review guidelines

Performance

  • Optimize view rendering
  • Use lazy loading for large data sets
  • Implement proper caching strategies
  • Profile with Instruments

When not to use it

  • When developing for non-Apple platforms
  • When using UIKit as the primary framework instead of SwiftUI

Limitations

  • Focuses exclusively on Apple platforms (iOS, macOS, watchOS, tvOS)
  • Prioritizes readability over being performant in some cases
  • Requires adherence to MVVM architecture

How it compares

This skill enforces a specific set of architectural patterns and best practices for Swift/SwiftUI development, providing a structured approach that ensures high-quality, maintainable code compared to ad-hoc development.

Compared to similar skills

swift side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
swift (this skill)02moNo flagsIntermediate
swiftui-expert-skill134moNo flagsIntermediate
swiftui-ui-patterns14moNo flagsIntermediate
ios-navigation23moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

swiftui-expert-skill

sickn33

Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.

1333

swiftui-ui-patterns

Dimillian

Best practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.

13

ios-navigation

HoangNguyen0403

SwiftUI navigation and deep linking using NavigationStack and Universal Links.

21

view

andrelucassvt

Cria uma nova View SwiftUI seguindo o padrao MVVM do projeto (iOS 15+). Use quando o usuario pedir para criar uma nova tela, view ou screen.

00

macos-menubar-tuist-app

HCMUTE-RTIC

Build, refactor, or review macOS menubar apps that use Tuist and SwiftUI. Use when creating or maintaining LSUIElement menubar utilities, defining Tuist targets/manifests, implementing model-client-store-view architecture, adding script-based launch flows, or validating reliable local build/run beha

00

swiftui-whats-new-27

CamilleScholtz

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 argu

00

Search skills

Search the agent skills registry