Skip to main content
skill CX Codex

swiftui-patterns · dpearson2699 — Claude Code skill: install guide

Guides SwiftUI view work around state, composition, environment wiring, and isolated previews. Use it when refactoring a screen or sorting out @Observable ownership.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill swiftui-patterns -a claude-code
Open on GitHub

What swiftui-patterns does

This skill guides SwiftUI implementation and review with an MV approach: views express state, while models and services keep business logic. It covers @Observable ownership, choosing @State, @Bindable, or @Environment, splitting views, ViewModifier, and .task-based loading.

Its workflow starts by recording existing behaviour, then makes the smallest structural change and builds after each step. Previews should cover loaded, loading, empty, and error states where they apply.

The guidance targets Swift 6.3 and iOS 26+, while the patterns are backward-compatible with iOS 17 except where noted. UI-bound @Observable stores need @MainActor isolation because observation does not make mutable shared state thread-safe.

What it helps with

  • review state ownership in a SwiftUI view
  • choose between @State, @Bindable, and @Environment
  • split a large screen into smaller views
  • create isolated previews for UI states
  • fix @Observable isolation for UI state

Example prompts for the agent

  • "Review this SwiftUI screen and check whether @State and @Bindable are used correctly."
  • "Split FeedView into smaller views while preserving its current behaviour."
  • "Create previews for loading, error, and empty list states."

How to install swiftui-patterns

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill swiftui-patterns -a claude-code

2Manually: put the files in place

~/.claude/skills/swiftui-patterns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swiftui-patterns/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swiftui-patterns

How do I install swiftui-patterns in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill swiftui-patterns -a claude-code, then run npx skills add dpearson2699/swift-ios-skills --skill swiftui-patterns -a claude-code again. The skill file is placed at ~/.claude/skills/swiftui-patterns/SKILL.md.

What does swiftui-patterns do?

It guides SwiftUI view implementation and review around MV structure, state management, environment dependencies, and isolated previews. It also covers asynchronous loading and selected iOS 26+ APIs.

Does swiftui-patterns support iOS 17?

The documented patterns are backward-compatible with iOS 17 except where a case is separately noted. Its main target is Swift 6.3 with iOS 26+.

Similar skills

Everything for Mobile →

swiftui-patterns by other authors comes first.

swiftui-patterns affaan-m Guides AI agents on modern SwiftUI architecture: @Observable state, type-safe navigation, and view performance. Useful when building or reviewing iOS and macOS UI. CX Codex +1 4,600installs swiftui-patterns official OpenAI Sets desktop-first macOS SwiftUI architecture, scene models, toolbars, split views, and clean multi-file project layouts. CX Codex GP ChatGPT 57installs swiftui-ui-patterns official OpenAI This skill helps build and refactor SwiftUI interfaces, from navigation and state to layouts and controls. Use it for new screens or changes to an existing project. CX Codex GP ChatGPT 114installs swiftui-specialist superagents-lab A skill that feeds an AI agent reference notes on idiomatic SwiftUI while it writes, reviews or edits your code. CX Codex +1 864installs swiftui-view-refactor official OpenAI Refactors SwiftUI view files into clean, testable structures with dedicated subview types and proper Observation ownership. CX Codex GP ChatGPT 113installs swiftui-motion AThevon Provides SwiftUI animation rules and decision trees for coding agents. Helps configure springs, phase animators, and clean transitions without visual bugs. CX Codex +1 943installs swiftui-whats-new-27 superagents-lab A reference skill covering SwiftUI API updates across 2027 Apple platforms. It prevents build failures when @State transitions to a macro and guides migration. CX Codex +1 737installs guide-swiftui-animations Prisma-Labs-Dev A guide skill for SwiftUI motion: implicit and explicit animations, transitions, phase and keyframe animations, the Animatable protocol. CX Codex +1 347installs

From the same set86

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor